![](/img/trans.png)
[英]Why can't I install python packages with pip on windows 10?
[英]Can't install Python v3.6 packages on Windows 10 via pip
我最近在Windows 10機器上安裝了python,但無法通過pip下載軟件包。 我已經安裝了3.6.1。 PIP版本9.0.1。
例如,發生這種情況:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>pip install parse-torrent-name
Collecting parse-torrent-name
Using cached parse-torrent-name-1.1.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Kintesh\AppData\Local\Temp\pip-build-uf2g9dii\parse-torrent
-name\setup.py", line 5, in <module>
description = f.read()
File "c:\users\kintesh\appdata\local\programs\python\python36-32\lib\encod
ings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 292:
character maps to <undefined>
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Kintesh\
AppData\Local\Temp\pip-build-uf2g9dii\parse-torrent-name\
為了進行記錄,我嘗試了以下操作:
pip install --upgrade setuptools
和easy_install -U setuptools
。 我在IOS上使用pythonista進行此工作比這更容易-為什么Windows必須如此困難?
有沒有辦法解決這個問題?
在Windows上安裝時,軟件包存在問題,這就是為什么您會收到此錯誤。 這不是pip或Windows問題。
該軟件包的作者已在GitHub上解決了該問題(請參閱commit ),但未將更新的軟件包推送到PyPI上,后者是pip和easy_install安裝的軟件包的默認來源。
同時,您可以通過使用pip install https://github.com/divijbindlish/parse-torrent-name/archive/master.zip
直接從GitHub安裝最新軟件包來解決此問題。
還有其他從GitHub安裝軟件包的方法,如此處所述 。 您甚至可以手動下載zip,並根據需要使用easy_install安裝zip。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.