"python setup.py install --user" got the "Permission denied: '/usr/bin/ANARCI'" error
Closed this issue · 2 comments
Thanks for developing such a great tool for antibody sequencing numbering. Unfortunately, I encountered an issue when I tried to install the latest version.
OS: Rocky Linux 9.1
Python version: 3.9.14
- hmmer-3.3.2 is installed and the directory of the executables is in the
$PATH
- cloned the latest code repository (git clone https://github.com/oxpig/ANARCI.git)
- tried to install with the command
python setup.py install --user
- got the error
error: [Errno 13] Permission denied: '/usr/bin/ANARCI'
When running python setup.py install
with --user
or --home="~"
, the ANARCI_LOC and ANARCI_BIN still follow the global setting:
ANARCI_LOC = /usr/local/lib64/python3.9/site-packages/anarci
ANARCI_BIN = /usr/bin/
To work around the issue, manually specify the ANARCI_LOC and ANARCI_BIN when running python setup.py install --user
ANARCI_LOC = "/home/user/.local/lib/python3.9/site-packages/anarci"
ANARCI_BIN = "/home/user/.local/bin"
From my best understanding, the class CustomInstallCommand may have to check if --user is specified and change the values of ANARCI_LOC and ANARCI_BIN to the user's local setting.
I have to agree that the installation procedure is far from optimal.
I would advice:
- use the standard python procedure for installation, this would go around the buggy behaviour of the location discovery.
For instanceANARCI_BIN
doessys.executable.split("python")
however, when the executable is part of a path that also contains python, it will be wrong:/opt/python/3.10/bin/python
will produce the wrong path. (basename would be better, but still not the way to go). - The downloading of additional files could perhaps be done post installation as a user call to disconnect the installation and usage? I.e.
python -m anarci --download-germlines
or whatever.
Install instructions have been updated to remove any references to root/user install. Simply clone and python setup.py install. We plan on updating the setup script in the future to resemble less archaic versions of python and decouple the installation and HMM training process.
Closing as outdated instructions have been removed; happy to receive any further suggestions for improvements in the future.