2014-12-05 3 views
2

Почему pip не устанавливает ПОСЛЕДНИЕ? Есть ли способ заставить ПОСЛЕДНИЕ?Почему PIP не обновляет пакет

$ 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... 

Примечание:

Ссылки: https://code.google.com/p/pefile/

+0

Когда все остальное терпит неудачу, и время поджимает, Nuke текущая установка пакета. – smci

ответ

2

Если вы посмотрите на pefile страницах 1.2.10-114 и 1.2.10-139 - вы будете видеть важное различие, последний не имеет раздел «Файлы» с источником и яйцом. Это означает, что файлы размещены снаружи, и вы должны позволить 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 
+0

Отличная добыча! – shadowbq

Смежные вопросы