發生這種情況是因爲您有一個環境變量引用了另一個不是您現在使用的版本的Python版本。
該如何解決這個問題:
在終端窗口(CMD.EXE),請嘗試以下命令: 集| FINDSTR /我蟒蛇
如果你得到這樣的輸出,
*路徑= C:\ Program Files文件(x86)的\英特爾\的ICL客戶端\; C:\ Program Files文件\英特爾\的ICL客戶\; C:\ csvn \ BIN \; C:\ ProgramData \ ORACLE \的Java \ javapath; C:\ WINDOWS \ SYSTEM32; C:\ WINDOWS; C:\ WINDOWS \ SYSTEM32 \ WBEM; C:\ WINDOWS \ SYSTEM32 \ WindowsPowerShell \ V1 .0; C:\ Program Files \ Java \ jdk1.8.0_101 \ bin; C:\ Apache \ apache-ant-1.10.1 \ bin; C:\ Program Files(x86)\ NVIDIA Corporation \ PhysX \ Common; D :\ Acedemic \ Open Source Project \ 10.11 \ bin; C:\ Program Files \ Git \ cmd; C:\ Program Files \ Intel \ WiFi \ bin \; C:\ Program Files \ Common Files \ Intel \ WirelessCommon \; C :\ Program Files(x86)\ Intel \ Intel(R)Management Engine Components \ DAL; C:\ Program Files \ Intel \ Intel(R)Management Engine Components \ DAL; C:\ Program Files(x86)\ Intel \ Intel (R)管理引擎Comp onent \ IPT; C:\ Program Files \ Intel \ Intel(R)Management Engine Components \ IPT; C:\ Program Files(x86)\ Skype \ Phone \; C:\ WINDOWS \ system32; C:\ WINDOWS; C: \ WINDOWS \ System32 \ Wbem; C:\ WINDOWS \ System32 \ WindowsPowerShell \ v1.0 \; C:\ Users \ Rajitha \ AppData \ Local \ Programs \ Python \ Python36-32; C:\ Program Files \ Intel \ WiFi \ bin \; C:\ Program Files \ Common Files \ Intel \ WirelessCommon \; C:\ Users \ Rajitha \ AppData \ Local \ Microsoft \ WindowsApps; PYTHONHOME = C:\ csvn \ Python25 *
刪除「PYTHONHOME」環境變量。
如果你得到這樣的輸出,
C:\用戶\ Acebulf>設置| C:\ Program Files(x86)\ NVIDIA Corporati on \ PhysX \ Common; C:\ Windows \ system32; C:\ Windows; C:\ Windows \ System32; C:\ Windows \ System32 \ Wbem; C:\ Windo ws \ System32 \ WindowsPowerShell \ v1.0 \; C:\ Program Files \ Intel \ WiFi \ bin \; C:\ Program Files \ Common Files \ Intel \ WirelessCommon \; C:\ Program Files \ Microsoft SQL Server \ 1 10 \ Tools \ Binn \; C:\ Program Files(x86)\ MiKTeX 2.9 \ miktex \ bin \; C:\ Program Files \ tel \ WiFi \ bin \; C:\ Program Files \ Common Files \ Intel \ WirelessCommon \; C:\ Python27 \ PYTHONPATH = C:\ Python27 \ Lib; C:\ Python27 \ DLLs; C:\ Python27 \ Lib \ lib-tk ;
刪除「PYTHONPATH」環境變量。
這應該修正錯誤!
謝謝。它爲我工作。 注意:在上述步驟之後,必須重新啓動命令提示符(關閉並再次打開) – 2017-12-26 11:54:37