如何在Windows 10上安装PyYaml?

时间:2018-02-04 18:15:35

标签: python pyyaml

它似乎是其他几个模块的必需模块。 我在Windows 10 64位上安装了Python 3.5,Python 3.6-3.2和Python 3.6。

我尝试pip3 install --upgrade pyYaml,但错误是

Collecting pyYaml
  Using cached PyYAML-3.12.tar.gz
Building wheels for collected packages: pyYaml
  Running setup.py bdist_wheel for pyYaml ... error
  Failed building wheel for pyYaml
  Running setup.py clean for pyYaml
Failed to build pyYaml
Installing collected packages: pyYaml
  Running setup.py install for pyYaml ... error
Exception:
Traceback (most recent call last):
  File "c:\users\whatever\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
    return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 76: invalid start byte


During handling of the above exception, another exception occurred:




Traceback (most recent call last):
  File "c:\users\whatever\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\whatever\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\whatever\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\whatever\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\users\whatever\appdata\local\programs\python\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\users\whatever\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
    return s.decode('utf_8')
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8a in position 76: invalid start byte

是的我知道同一标题的另一个问题,但他们的解决方案并不适合我。

正在运行pip3 install PyYAML-3.12-cp35-cp35m-win_amd64.whlPyYAML-3.12-cp35-cp35m-win_amd64.whl is not a supported wheel for this platform,仅此而已。

我还试过了网站上的几个不同的轮盘文件版本。还有我用pip和pip3尝试的所有这些东西。

我还下载了.exe安装程序并且运行良好,并且它自动将其保存在python35路径中,但是我不知道如何使用它,它不会发生任何事情。

我对python很陌生,所以我有点卡住,因为它不起作用。

喜欢wtf

0 个答案:

没有答案