问题
I'm having problems installing python modules PyX, I received the following error when using pip:
$ pip install PyX
Collecting PyX
Could not find a version that satisfies the requirement PyX (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external PyX to allow).
No matching distribution found for PyX
Then I tried conda install, but it cannot locate it. I also searched and found nothing. Then I tried pip allow external - doesn't work on either Cygwin or cmd:
$ pip install --allow-external pyx pyx
Collecting pyx
Downloading https://downloads.sourceforge.net/project/pyx/pyx/0.14/PyX 0.14.tar.gz (2.5MB)
No files/directories in c:\cygwin\tmp\pip-build-vqqlqz\pyx\pip-egg-info (from PKG-INFO)
I've never seen such error before. Anyone here has some suggestion please (installed under Anaconda preferred)? Thank you very much in advance.
回答1:
Okay here is one solution I just found. However, I still could not explain the previous errors.
Upon trying to manually install PyX (go to the local PyX directory):
$ python setup.py install
*** Sorry, this version of PyX runs on Python 3 only. ***
If you want to use PyX on Python 2, please use one of our old releases up to PyX 0.12.x, i.e. execute something like:
pip install pyx==0.12.1
So then I tried:
$ pip install --allow-external pyx pyx==0.12.1
Then it worked. Thanks.
回答2:
As of this writing, using the --allow-external
flag will yield the following deprecation message:
DEPRECATION: --allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Executing pip install pyx==0.12.1
should do.
On OS X, you may receive the following error:
error: could not create '/Library/Python/2.7/site-packages/pyx': Permission denied
Using the --user
flag should allow you to install the package:
pip install pyx==0.12.1 --user
来源:https://stackoverflow.com/questions/32830986/fail-to-install-pyx-using-anaconda