2017-02-23 75 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被卸载,然后重新安装在主驱动器中的独占目录。