2017-02-23 74 views
0

我在Windows10上運行Python 2.7(ArcGIS提供的默認版本)和Python 3.5。我一直在嘗試使用二進制安裝GDAL,但我不斷收到以下錯誤:在Windows上安裝GDAL的問題。無法更新pip

Complete output from command python setup.py egg_info: 
 
    Traceback (most recent call last): 
 
     File "<string>", line 20, in <module> 
 
     File "C:\Users\NO39B5~1\AppData\Local\Temp\pip-build-fqt5us1x\shapely\setup.py", line 38, in <module> 
 
     from shapely._buildcfg import geos_version_string, geos_version, \ 
 
     File "C:\Users\NO39B5~1\AppData\Local\Temp\pip-build-fqt5us1x\shapely\shapely\_buildcfg.py", line 200, in <module> 
 
     lgeos = CDLL("geos.dll") 
 
     File "C:\Users\NoΘ\AppData\Local\Programs\Python\Python35\lib\ctypes\__init__.py", line 347, in __init__ 
 
     self._handle = _dlopen(self._name, mode) 
 
    OSError: [WinError 126] The specified module could not be found 
 

 
    ---------------------------------------- 
 
Command "python setup.py egg_info" failed with error code 1 in C:\Users\NO39B5~1\AppData\Local\Temp\pip-build-fqt5us1x\shapely 
 
You are using pip version 7.1.2, however version 9.0.1 is available. 
 
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

然後我嘗試更新的點子,這是我成功的2.7版本做了,但是當我嘗試做3.5版本我收到以下錯誤相同的過程:

C:\Users\Noé\Downloads>py -3.5 get-pip.py 
 
Collecting pip 
 
    Using cached pip-9.0.1-py2.py3-none-any.whl 
 
Collecting wheel 
 
    Using cached wheel-0.29.0-py2.py3-none-any.whl 
 
Installing collected packages: pip, wheel 
 
    Found existing installation: pip 7.1.2 
 
Exception: 
 
Traceback (most recent call last): 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\basecommand.py", line 215, in main 
 
    status = self.run(options, args) 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\commands\install.py", line 342, in run 
 
    prefix=options.prefix_path, 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\req\req_set.py", line 778, in install 
 
    requirement.uninstall(auto_confirm=True) 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\req\req_install.py", line 694, in uninstall 
 
    for path in pip.wheel.uninstallation_paths(dist): 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\wheel.py", line 534, in unique 
 
    for item in fn(*args, **kw): 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\wheel.py", line 553, in uninstallation_paths 
 
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD'))) 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\_vendor\pkg_resources\__init__.py", line 1472, in get_metadata_lines 
 
    return yield_lines(self.get_metadata(name)) 
 
    File "C:\Users\NO39B5~1\AppData\Local\Temp\tmp293_3msk\pip.zip\pip\_vendor\pkg_resources\__init__.py", line 1469, in get_metadata 
 
    return value.decode('utf-8') if six.PY3 else value 
 
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 22367: invalid continuation byte 
 
You are using pip version 7.1.2, however version 9.0.1 is available. 
 
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

我一直在尋找很多網站和論壇的答案,我很確定造成這個錯誤的是我用戶名中的e的特殊字符。有沒有辦法運行安裝代碼,使編碼「錯誤」得到糾正?最明顯的方法是更改​​我的用戶文件夾的名稱,但這很可能對PC有害。

如果我的假設是錯誤的,還有什麼可能導致這個問題?

回答

0

而不是複雜化,Python被卸載,然後重新安裝在主驅動器中的獨佔目錄。