簡體   English   中英

在Windows上安裝GDAL時出現問題。 無法更新點子

[英]Issues installing GDAL on Windows. Cannot update pip

我正在Windows10上運行Python 2.7(ArcGIS提供的默認版本)和Python 3.5。 我一直在嘗試使用二進制文件安裝GDAL,但是我一直收到以下錯誤:

  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有害。

萬一我的假設是錯誤的,還有什么可能導致此問題?

不再使事情復雜化,而是卸載了Python,然后將其重新安裝在主驅動器的專有目錄中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM