You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the install script (setup.py) strips and ignores the --user flag from pip. This is important for Gentoo installs as to not corrupt the system Python. Basically, I get the following:
$ pip install --user https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip
Collecting https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip
Using cached https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip (316 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-wgfoujw5/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-wgfoujw5/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3q03l2yx
cwd: /tmp/pip-req-build-wgfoujw5/
Complete output (19 lines):
WARNING: Skipping axidrawinternal as it is not installed.
ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
Traceback (most recent call last):
File "/tmp/pip-req-build-wgfoujw5/setup.py", line 46, in replacement_setup
subprocess.check_call([sys.executable, '-m', 'pip', 'install', wheel_file])
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3.9', '-m', 'pip', 'install', 'prebuilt_dependencies/axidrawinternal-3.1.0-py2.py3-none-any.whl']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-wgfoujw5/setup.py", line 58, in <module>
replacement_setup(
File "/tmp/pip-req-build-wgfoujw5/setup.py", line 51, in replacement_setup
raise RuntimeError("Could not install one or more prebuilt dependencies.", err.with_traceback(err.__traceback__))
RuntimeError: ('Could not install one or more prebuilt dependencies.', CalledProcessError(1, ['/usr/bin/python3.9', '-m', 'pip', 'install', 'prebuilt_dependencies/axidrawinternal-3.1.0-py2.py3-none-any.whl']))
WARNING: It looks like you might be attempting to install this in a non-pip way. This is discouraged. Use `pip install .` (or `pip install -r requirements.txt` if you are a developer with access to the relevant private repositories).
----------------------------------------
WARNING: Discarding https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
That said, if I download the scripts by hand (AxiDraw_API_310r1) and modify setup.py to change:
Everything works fine. Basically, I believe this call needs to include any command line flags provided to pip, such as --user, for some systems like Gentoo to install properly.
The text was updated successfully, but these errors were encountered:
We don't want to implement that directly as stated here ( subprocess.check_call([sys.executable, '-m', 'pip', 'install', '--user', wheel_file])) because we don't want that to be the default. However, I'm glad that you note the workaround, and we'll look into passing through additional flags.
Yes, I completely agree this flag should not be hard coded. Mostly, I wanted to document the issue and potential work around for others. I think feature request for passing through the flags is the right option. Thanks for having a look!
It looks like the install script (setup.py) strips and ignores the --user flag from pip. This is important for Gentoo installs as to not corrupt the system Python. Basically, I get the following:
That said, if I download the scripts by hand (AxiDraw_API_310r1) and modify setup.py to change:
to
Everything works fine. Basically, I believe this call needs to include any command line flags provided to pip, such as --user, for some systems like Gentoo to install properly.
The text was updated successfully, but these errors were encountered: