为什么pip
没有安装LATEST?有没有办法强迫LATEST?
$ sudo pip install --upgrade pefile
Requirement already up-to-date: pefile in /usr/local/lib/python2.7/dist-packages
Cleaning up...
$ pip show pefile
---
Name: pefile
Version: 1.2.10-114
Location: /usr/local/lib/python2.7/dist-packages
Requires:
$ pip search "pefile"
pefile - Python PE parsing module
INSTALLED: 1.2.10-114
LATEST: 1.2.10-139
$ sudo pip install --upgrade --force-reinstall --pre pefile
Downloading/unpacking pefile
Downloading pefile-1.2.10-114.tar.gz (49kB): 49kB downloaded
Running setup.py (path:/tmp/pip_build_root/pefile/setup.py) egg_info for package pefile
Installing collected packages: pefile
Found existing installation: pefile 1.2.10-114
Uninstalling pefile:
Successfully uninstalled pefile
Running setup.py install for pefile
Successfully installed pefile
Cleaning up...
注意:
$ pip list
pefile (1.2.10-114)
pip (1.5.6)
答案 0 :(得分:2)
如果您查看1.2.10-114
和1.2.10-139
的pefile
页面,您会看到一个重要的区别,后者没有带有来源的“文件”部分蛋。这意味着文件是在外部托管的,您需要允许pip
从 external和unverified来源安装:
pip install pefile --upgrade --allow-external=pefile --allow-unverified=pefile
演示:
$ pip show pefile
---
Name: pefile
Version: 1.2.10-114
$ pip install pefile --upgrade --allow-external=pefile --allow-unverified=pefile
pefile an externally hosted file and may be unreliable
pefile is potentially insecure and unverifiable.
...
Installing collected packages: pefile
Found existing installation: pefile 1.2.10-114
Uninstalling pefile:
Successfully uninstalled pefile
Running setup.py install for pefile
Successfully installed pefile
Cleaning up...
$ pip show pefile
---
Name: pefile
Version: 1.2.10-139