Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 700376

Summary: dev-python/pip ignores --user parameter while trying to install pyinstaller
Product: Gentoo Linux Reporter: Pavel Kozlov <pkozlov.vrn>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED DUPLICATE    
Severity: normal CC: mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Pavel Kozlov 2019-11-17 16:42:02 UTC
Hello. I am trying to install "pyinstaller" with pip. There is no ebuild for this tool, though may be not needed, I have heart that for some tools pip install is recommended way to install them, not through emerge...

However, when I am trying to do so, I see this:

$ pip install pyinstaller --user
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz
  Installing build dependencies ... error
  ERROR: Complete output from command /usr/bin/python3.6 /usr/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ezk87alw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel:
  ERROR: ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
  ----------------------------------------
ERROR: Command "/usr/bin/python3.6 /usr/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ezk87alw/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel" failed with error code 1 in None

Though I added "--user" option, it seems that pip ignores it.

pip version is 19.1 (tried 19.3.1 also). I have no idea why it tries to install setuptools, it's already in my system (tried 40.6.3 and newer 41.5.1). And even if it is needed, why on Earth it fails?..

Could be of course bug in pip itself, but just in case, could it be related to Gentoo patches? Since error message has word "Gentoo" inside.
Comment 1 mgcyung 2020-04-05 00:57:28 UTC
The same problem.
Comment 2 Beetle B. 2020-04-17 23:47:19 UTC
Exact same problem here when I do:

pip install --user --upgrade xonsh

(Doesn't matter if I put upgrade first or user first).

This is very "not good"!

The weird thing is a few minutes prior to that I did:

pip install --user xontrib-autojump and it worked. I wonder if the problem is only when I try to upgrade?
Comment 3 Beetle B. 2020-04-18 05:41:21 UTC
This is the actual message. 

Even though I passed the --user option, it is trying to do --no-user for a dependency.

Collecting xonsh
  Using cached https://files.pythonhosted.org/packages/b8/70/c43e9a44238711d7bc4d35abbdf853881ad911e6c07bbf93afc164ba02ec/xonsh-0.9.17.tar.gz
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.6 /usr/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-7va1y9av/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (1 lines):
  ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 /usr/lib64/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-7va1y9av/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
Comment 4 Beetle B. 2020-04-18 05:42:11 UTC
Bug #692960 is very similar:

https://bugs.gentoo.org/692960
Comment 5 Beetle B. 2020-04-18 05:47:55 UTC
Rebuilding pip with "vanilla" USE flag fixed this.

This is one of the most frustrating things I've come across. The ebuild needs to be fixed (although it does seem upstream is at fault). The error message is just completely unhelpful and misleading.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-07-29 05:52:24 UTC

*** This bug has been marked as a duplicate of bug 692960 ***