2015-06-08 11 views
5
पर pip.exe उन्नयन

पिप मुझे एक संदेश के साथ उन्नत करने के लिए पूछा:"प्रवेश निषेध है" जबकि Windows

You are using pip version 7.0.1, however version 7.0.3 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 

तो मुझे लगता है कि आदेश भाग गया और मैं एक अपवाद है कि पिप क्योंकि पहुँच पुराने संस्करण की स्थापना रद्द नहीं कर सकते हैं मेरे उपयोगकर्ता के लिए निर्देशिका से इनकार किया है:

 
    Collecting pip 
    Downloading pip-7.0.3-py2.py3-none-any.whl (1.1MB) 
     100% |################################| 1.1MB 292kB/s 
    Installing collected packages: pip 
    Found existing installation: pip 7.0.1 
    Uninstalling pip-7.0.1: 
     Successfully uninstalled pip-7.0.1 
    Exception: 
    Traceback (most recent call last): 
    File "C:\Python27\lib\site-packages\pip\basecommand.py", line 223, in main 
    status = self.run(options, args) 
    File "C:\Python27\lib\site-packages\pip\commands\install.py", line 297, in run 

    root=options.root_path, 
    File "C:\Python27\lib\site-packages\pip\req\req_set.py", line 633, in install 
    requirement.commit_uninstall() 
    File "C:\Python27\lib\site-packages\pip\req\req_install.py", line 734, in commit_uninstall 
    self.uninstalled.commit() 
    File "C:\Python27\lib\site-packages\pip\req\req_uninstall.py", line 153, in commit 
    rmtree(self.save_dir) 
    File "C:\Python27\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f 
    return Retrying(*dargs, **dkw).call(f, *args, **kw) 
    File "C:\Python27\lib\site-packages\pip\_vendor\retrying.py", line 212, in call 
    raise attempt.get() 
    File "C:\Python27\lib\site-packages\pip\_vendor\retrying.py", line 247, in get 

    six.reraise(self.value[0], self.value[1], self.value[2]) 
    File "C:\Python27\lib\site-packages\pip\_vendor\retrying.py", line 200, in call 
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False) 
    File "C:\Python27\lib\site-packages\pip\utils\__init__.py", line 89, in rmtree 
    onerror=rmtree_errorhandler) 
    File "C:\Python27\lib\shutil.py", line 247, in rmtree 
    rmtree(fullname, ignore_errors, onerror) 
    File "C:\Python27\lib\shutil.py", line 247, in rmtree 
    rmtree(fullname, ignore_errors, onerror) 
    File "C:\Python27\lib\shutil.py", line 252, in rmtree 
    onerror(os.remove, fullname, sys.exc_info()) 
    File "C:\Python27\lib\site-packages\pip\utils\__init__.py", line 101, in rmtree_errorhandler 
    func(path) 
    WindowsError: [Error 5] Access is denied: 'c:\\users\\chris\\appdata\\local\\temp\\pip-ossyhh-uninstall\\python27\\scripts\\pip.exe' 

मैं Windows 8.1 चल रहा हूँ, लेकिन मैं विंडोज 7 चलाने वाले एक और मशीन पर यह एक ही त्रुटि यह नया संस्करण की स्थापना को रोकने के लिए प्रतीत नहीं होता था, लेकिन मैं अपनी temp निर्देशिका में छोड़ा पाइप फ़ोल्डरों के साथ खत्म होता है। क्या कोई जानता है कि ऐसा क्यों होता है या मैं इसे कैसे ठीक कर सकता हूं?

Edit1: अजीब तरह, व्यवस्थापक privlidges साथ उन्नयन चल रहे नई अपवाद फेंकता है:

File "C:\Python27\lib\site-packages\pip-7.0.1-py2.7.egg\pip\_vendor\distlib\scripts.py", line 302, in _get_launcher 
result = finder(distlib_package).find(name).bytes 
AttributeError: 'NoneType' object has no attribute 'bytes'` 

और पूरी तरह से नवीनीकरण विफल।

EDIT2: इस समस्या के समाधान पाने के लिए easy_install का उपयोग करने की पिप उन्नत करने के लिए (या तो यू या -m विकल्प) प्रतीत होता है एक ही रास्ता है, लेकिन यह मेरे लिए एक समस्या की तरह लगता है अगर पिप नहीं कर सकते स्वयं को अपग्रेड करें, जब इसका इरादा (और कहा गया) कार्यक्षमता ऐसा करना है।

+1

आप व्यवस्थापक विशेषाधिकार के बिना एक कमांड प्रॉम्प्ट से चला रहे हैं की कोशिश? – paisanco

+0

यह भी एक मुद्दा हो सकता है! व्यवस्थापक –

+0

के रूप में चलाएं मुझे लगता है कि मैंने पढ़ा है कि यह appdata \ local \ temp फ़ोल्डर पर सेट अनुमतियों के साथ एक समस्या है। आप इस पर अनुमतियों की जांच करने का प्रयास कर सकते हैं। – jangler

उत्तर

4

समस्या यहाँ जाहिरा तौर पर है, क्योंकि आप अपने आप को उन्नत करने के pip.exe चल रहे हैं। तो हटाए जाने के लिए pip.exe वास्तव में उस समय चल रहा है। (हालांकि अन्य हैं)

python -m pip install --upgrade pip 

यह इस bug report से है:

• प्रवेश निषेध है: '... pip.exe' है ठीक एक अलग कमांड लाइन का उपयोग करने के लिए है क्योंकि आप pip.exe wrapper का उपयोग कर पाइप को अपग्रेड कर रहे हैं जो अपग्रेड में बदल जाता है। विंडोज़ पर आप इन-एक्जिक्यूटिव एक्जिक्यूटिव/डीएलएल को प्रतिस्थापित नहीं कर सकते हैं। आपको पायथन -एम पीआईपी इंस्टॉल - अपग्रेड पाइप का उपयोग करना चाहिए। आईआईआरसी यह दस्तावेज में नोट किया गया है।

3

मैं एक विंडोज 7 मशीन पर हाल ही में एक ही समस्या मिला है। मैं व्यवस्थापक (अपनी टिप्पणी से) के रूप में कमांड प्रॉम्प्ट भाग गया, और फिर pip install --upgrade pip में टाइप।

यह wazoo बाहर त्रुटि संदेश लौट आए, लेकिन फिर जब मैं इसे फिर से (pip install --upgrade pip) करने की कोशिश की है, यह मुझे बताया पिप पहले से ही तारीख तक किया गया था। फिर pip -V ने मुझे बताया कि मेरे पास 7.0.3 पाइप था।

कोई विचार क्या हो रहा है। खिड़कियों पर पाइथन पैकेज प्राप्त करने का प्रयास करना बहुत मुश्किल लगता है। उम्मीद है कि मददगार था।

इसके अलावा, मैं अजगर 3.5 है, जो अलग हो सकता है का उपयोग कर रहा हूँ।

-1

मैं एक ही समस्या का सामना करना पड़ा। मैंने बस अपने मैक टर्मिनल पर SUDO कमांड का उपयोग किया और यह काम किया। नीचे टर्मिनल आउटपुट है।

sudo स्थापित पिप यू पिप

Anuvrats-MacBook-Air:~ anuvrattiku$ pip -V 
pip 7.1.2 from /Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg (python 2.7) 
Anuvrats-MacBook-Air:~ anuvrattiku$ **sudo pip install -U pip** 
Password: 
The directory '/Users/anuvrattiku/Library/Caches/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's -H flag. 
The directory '/Users/anuvrattiku/Library/Caches/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's -H flag. 
Collecting pip 
Downloading pip-8.0.2-py2.py3-none-any.whl (1.2MB) 
100% |████████████████████████████████| 1.2MB 272kB/s 
Installing collected packages: pip 
Found existing installation: pip 7.1.2 
Uninstalling pip-7.1.2: 
Successfully uninstalled pip-7.1.2 
Successfully installed pip-8.0.2 
Anuvrats-MacBook-Air:~ anuvrattiku$ 
0

मुझे पीआईपी-7.1.2 संस्करण का उपयोग करके matplotlib इंस्टॉल करते समय भी समस्या का सामना करना पड़ा, इसलिए मैंने इसे 9.0.1 तक अपग्रेड किया।

हालांकि इसे अद्यतन करते समय मुझे pip.exe से इनकार करने की त्रुटि मिली, लेकिन जब मैंने पीपी-वी का उपयोग करके संस्करण की जांच की तो इसे अपडेट किया गया। और मैं बस पाइप स्थापित matplotlib चलाते हैं। यह मेरे लिए काम किया।

D:\Users\703186511>pip install --upgrade pip 

या

D:\Users\703186511>python -m pip install --upgrade pip 
D:\Users\703186511>pip -V 
D:\Users\703186511>pip install matplotlib 
संबंधित मुद्दे