What does "error: option - single version - external managed not recognized" mean?

It seems that I suddenly encountered an error error: option --single-version-externally-managed not recognized when pip install contains packages with variations (including PyObjC and astropy ). I have never seen this error before, but now it also appears on travis-ci builds for which nothing has changed.

Does this error indicate an outdated distribution? Or an incorrectly specified option in setup.py ? Or something else?

+63
python pip distribute
Jan 12 '13 at 18:24
source share
6 answers

New update:

Install the latest version of setuptools . If you still get the error, install wheel .

 pip install -U setuptools pip install -U wheel 



Original answer / More:

--single-version-externally-managed is an option used for Python packages that instructs setuptools to create a Python package that can be easily managed by the host package manager if necessary, such as Yum or Apt.

If you see this message, you may have an older version of setuptools or Python. Try using Distribute, which is a newer version of setuptools and is backward compatible. These packages can expect what you already have.

https://pypi.python.org/pypi/distribute

Edit: At the moment, the distribution has been integrated into the main setuptools project. Just install the latest version of setuptools . As pointed out by @wynemo, you can use the --egg option, as this is more suitable for those who do a manual installation where you are not going to create a system package for distribution.

+23
Mar 06 '13 at 21:41
source share

Add --egg option

 pip install --egg SCons 

I am using pip version 1.4.1

+128
Oct 31 '13 at 2:54 on
source share

Installing wheel solved this problem with a recent pip (I used 8.1.2):

 pip install wheel 
+37
Mar 24 '16 at 18:50
source share

Try updating setuptools as follows:

pip install --upgrade setuptools

+6
Oct 29 '14 at 2:03
source share

I had this problem. It turned out that this is a file rights issue in my cache pip.

If you see a message at the very beginning of your pip output, for example

 The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo -H flag. The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo -H flag. 

you may have the same problem. You can enable this either by making sure that you have the correct permissions for the files in the peak cache (something like chown -R $(whoami) /home/ubuntu/.cache/pip ), or if you work on UNIX, you can set the peak cache location using XDG_CACHE_HOME env var for some folder that you own.

+3
Nov 03 '16 at 4:23
source share

I have this problem on my macbook too when I try to upgrade a single python package. I check the protocol version in OS X, it is too old: 1.1. I use the following cmd to upgrade pip to 1.5.6

 easy_install -U pip 

Then this error is fixed.

0
Sep 24 '14 at 6:42
source share



All Articles