无法通过pip在Windows 10上安装PythonV3.6软件包

2024-04-25 04:52:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我最近在我的windows10机器上安装了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\

为了记录在案,我尝试了以下方法:

  1. 安装pyCurl(甚至不记得我为什么要这么做)
  2. 尝试了pip install --upgrade setuptoolseasy_install -U setuptools。在

我在IOS上的pythonista上的工作比这个简单-为什么Windows要这么难?!在

有办法解决这个问题吗?在


Tags: installpipnameinpyinfoparseegg
1条回答
网友
1楼 · 发布于 2024-04-25 04:52:03

在Windows上安装时,程序包有问题,这就是为什么会出现错误。这不是pip或Windows问题。在

包的作者已经在GitHub上修复了这个问题(参见commit),但没有将更新后的包推送到PyPI上,PyPI是pip安装的包和easy_安装的默认源。在

同时,您可以通过使用pip install https://github.com/divijbindlish/parse-torrent-name/archive/master.zip直接从GitHub安装最新的包来解决这个问题。在

还有其他从GitHub安装包的方法,如here所述。如果需要,您甚至可以手动下载zip,并使用easy-uninstall安装zip。在

相关问题 更多 >