Closed Ninjagod1251 closed 2 years ago
Was working with @Ninjagod1251 and we stumbled upon this, I believe it's a permissions issue with /usr/local/lib/python3.8/dist-packages/
What commands were run to trigger this condition? Looks like incorrect information in the install instructions
This happens when you try to install a package system-wide without sudo or being the root user. You should either install with pip install --user ...
, or use a virtualenv. Installing packages system-wide shouldn't be recommended.
Issue is still persistent. We tried to install pip install -e .[dev]
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chris/_src/ape/setup.py'"'"'; __file__='"'"'/home/chris/_src/ape/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
cwd: /home/chris/_src/ape/
Complete output (18 lines):
running develop
WARNING: The user site-packages directory is disabled.
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 2] No such file or directory: '/usr/lib/python3.8/site-packages/test-easy-install-4600.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/lib/python3.8/site-packages/
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chris/_src/ape/setup.py'"'"'; __file__='"'"'/home/chris/_src/ape/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.
So it seems like the install instructions need to specify how to install via virtualenv
, or use pyenv
or pipx
to manage it.
The issue was resolved with this past solution: https://github.com/ApeWorX/ape/issues/105 I had to add this to the bashrc
# So pyenv gets recognized
export PATH="$PATH:$HOME/.pyenv/bin"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Environment information
ape
and plugin versions:What went wrong?
Please include information like:
The following error occurred while trying to add or remove files in the installation directory:
The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:
Perhaps your account does not have write access to this directory? If the installation directory is a system-owned directory, you may need to sign in as the administrator or "root" account. If you do not have administrative access to this machine, you may wish to choose a different installation directory, preferably one that is listed in your PYTHONPATH environment variable.
For information on other options, you may wish to consult the documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.