2016-03-22 51 views
1

我看了很多關於此的帖子,沒有任何東西可以解決它。我初步開始使用Python 3.5,聽說有幾個未解決的問題與點,所以我卸載並重新安裝Python 3.4.4 -PIP - 升級不起作用Python3.4.4

我想使用pyautogui工作任務,但是當我嘗試直接安裝pyautogui在Python3.4.4安裝後,它告訴我找不到PIL模塊。我讀過另一篇文章來安裝3.4.4並更新pip,然後安裝pyautogui。酷,所以我安裝了3.4.4,我需要升級點子。所以我輸入了

Scripts\pip.exe install --upgrade pip 

從根文件夾中的命令行。每次我得到這個

Exception: 
Traceback (most recent call last): 
    File "h:\python34\lib\shutil.py", line 527, in move 
    os.rename(src, real_dst) 
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 'h:\\python34\\scripts\\pip.exe' -> 'C:\\Users\\z 
jf\\AppData\\Local\\Temp\\pip-qo75adq9-uninstall\\python34\\scripts\\pip.exe' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "h:\python34\lib\site-packages\pip\basecommand.py", line 211, in main 
    File "h:\python34\lib\site-packages\pip\commands\install.py", line 311, in run 

    File "h:\python34\lib\site-packages\pip\req\req_set.py", line 640, in install 
    File "h:\python34\lib\site-packages\pip\req\req_install.py", line 716, in unin 
stall 
    File "h:\python34\lib\site-packages\pip\req\req_uninstall.py", line 125, in re 
move 
    File "h:\python34\lib\site-packages\pip\utils\__init__.py", line 315, in renam 
es 
    File "h:\python34\lib\shutil.py", line 540, in move 
    os.unlink(src) 
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 'h:\\python34\\scripts\\pip.exe' 

事情是,沒有什麼在該文件夾中運行。我沒有開放的Windows資源管理器,我沒有任何訪問任何文件的內容,而且我顯然使用命令行從上層目錄運行它。所以我不知道爲什麼它說pip.exe正在被另一個進程使用。它正在運行的唯一過程就是它本身,如果這是問題,那麼你應該如何在這個世界上升級它?

**編輯:**每接受的答案,爲了得到PIP更新我用命令

python -m pip install -U pip

一旦工作,我試圖再次安裝pyautogui。它仍然表示無法找到PIL模塊。 PIL是Python圖像庫。我安裝了它使用

python -m pip install image

而且一旦工作,我再裝pyautogui像這樣

python -m pip install pyautogui

+0

我想Guido會害怕他是否知道你嘗試過Python 4. – Goyo

+0

@Goyo大聲笑,耶穌。我的意思是3.5。我會改變它。 Brain lapse – zfrisch

+0

當然,你以管理員身份執行「cmd.exe」? –

回答

5

在Windows升級PIP谷歌「在Windows上升級點子」或交替在運行此命令提示符:

python -m pip install -U pip 

這是Windows上的一個已知問題,其中可執行文件不能被覆蓋十個運行中。對不起沒有鏈接,但應該很容易找到更多的細節。

+0

我會試試看,並回復給你。每次點突破時我都需要一分鐘,我不得不重新安裝它。手指交叉和所有。 – zfrisch

+0

工作就像一個魅力! – zfrisch