One-time Bypass:
pip install --user --install-option="--prefix=" <package_name>
or
python setup.py install
Please note that after = there is no text (even without spaces).
Do not forget the --user flag.
Installing multiple packages:
Create ~/.pydistutils.cfg (or the equivalent for your OS / platform) with the following contents:
[install] prefix=
Please note that after = there is no text (even without spaces).
Then run the necessary pip install --user or python setup.py install --user . Do not forget the --user flag.
Finally, delete or rename this file. If you leave this file, it will cause problems when installing Python packages in system-wide mode (i.e. Without --user ) as this user with this ~/.pydistutils.cfg .
Reason for this problem
This seems to be a problem with OpenSUSE and RedHat, which led to a virtualenv error on these platforms.
The error is related to the distutils configuration file at the system level (in my case /usr/lib64/python2.6/distutils/distutils.cfg ), where was this
[install] prefix=/usr/local
Basically, this is equivalent to always having the install command run as install --prefix=/usr/local . You must override this specification using one of the above methods.
gotgenes Dec 21 2018-10-12T00: 00Z
source share