如何修复错误:尝试在windows上安装pyp2p时,命令出错,退出状态为1:

2024-09-28 05:20:03 发布

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

运行命令时: pip install pyp2p 我收到以下错误:

Collecting pyp2p
  Using cached pyp2p-0.8.2-py2.py3-none-any.whl (66 kB)
Collecting pyroute2>=0.3.15
  Using cached pyroute2-0.5.14.tar.gz (873 kB)
Collecting ntplib>=0.3.3
  Using cached ntplib-0.3.4-py3-none-any.whl (5.9 kB)
Collecting ipaddress>=1.0.14
  Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: requests>=2.8.1 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from pyp2p) (2.24.0)
Collecting netifaces>=0.10.4
  Using cached netifaces-0.10.9.tar.gz (28 kB)
Collecting twisted>=15.4.0
  Using cached Twisted-20.3.0.tar.bz2 (3.1 MB)
Requirement already satisfied: win_inet_pton in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from pyroute2>=0.3.15->pyp2p) (1.1.0)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.8.1->pyp2p) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.8.1->pyp2p) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.8.1->pyp2p) (1.25.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from requests>=2.8.1->pyp2p) (2020.6.20)
Requirement already satisfied: zope.interface>=4.4.2 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from twisted>=15.4.0->pyp2p) (5.2.0)
Requirement already satisfied: constantly>=15.1 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from twisted>=15.4.0->pyp2p) (15.1.0)
Requirement already satisfied: incremental>=16.10.1 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from twisted>=15.4.0->pyp2p) (17.5.0)
Requirement already satisfied: Automat>=0.3.0 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from twisted>=15.4.0->pyp2p) (20.2.0)
Requirement already satisfied: hyperlink>=17.1.1 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from twisted>=15.4.0->pyp2p) (21.0.0)
Requirement already satisfied: PyHamcrest!=1.10.0,>=1.9.0 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from twisted>=15.4.0->pyp2p) (2.0.2)
Requirement already satisfied: attrs>=19.2.0 in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from twisted>=15.4.0->pyp2p) (20.3.0)
Requirement already satisfied: six in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from Automat>=0.3.0->twisted>=15.4.0->pyp2p) (1.15.0)
Requirement already satisfied: setuptools in c:\users\woutv\appdata\local\programs\python\python38-32\lib\site-packages (from zope.interface>=4.4.2->twisted>=15.4.0->pyp2p) (53.0.0)
Using legacy 'setup.py install' for netifaces, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pyroute2, since package 'wheel' is not installed.
Using legacy 'setup.py install' for twisted, since package 'wheel' is not installed.
Installing collected packages: twisted, pyroute2, ntplib, netifaces, ipaddress, pyp2p
    Running setup.py install for twisted ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\woutv\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\woutv\\AppData\\Local\\Temp\\pip-install-5hfmjmxi\\twisted_4f16cdfbaea243e282e7aa8a376189e6\\setup.py'"'"'; __file__='"'"'C:\\Users\\woutv\\AppData\\Local\\Temp\\pip-install-5hfmjmxi\\twisted_4f16cdfbaea243e282e7aa8a376189e6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\woutv\AppData\Local\Temp\pip-record-y_l6uo1b\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\woutv\appdata\local\programs\python\python38-32\Include\twisted'
         cwd: C:\Users\woutv\AppData\Local\Temp\pip-install-5hfmjmxi\twisted_4f16cdfbaea243e282e7aa8a376189e6\
    Complete output (955 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.8
    creating build\lib.win32-3.8\twisted

有许多行看起来几乎与此相同:copying src\twisted\conch\unix.py -> build\lib.win32-3.8\twisted\conch

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -Ic:\users\woutv\appdata\local\programs\python\python38-32\include -Ic:\users\woutv\appdata\local\programs\python\python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include" /Tcsrc/twisted/test/raiser.c /Fobuild\temp.win32-3.8\Release\src/twisted/test/raiser.obj
    raiser.c
    c:\users\woutv\appdata\local\programs\python\python38-32\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\woutv\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\woutv\\AppData\\Local\\Temp\\pip-install-5hfmjmxi\\twisted_4f16cdfbaea243e282e7aa8a376189e6\\setup.py'"'"'; __file__='"'"'C:\\Users\\woutv\\AppData\\Local\\Temp\\pip-install-5hfmjmxi\\twisted_4f16cdfbaea243e282e7aa8a376189e6\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\woutv\AppData\Local\Temp\pip-record-y_l6uo1b\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\woutv\appdata\local\programs\python\python38-32\Include\twisted' Check the logs for full command output.

有人知道怎么解决这个问题吗? 我不知道这是否是足够的信息,所以不要犹豫,要求更多的信息


Tags: installinlibpackageslocaltwistedrequirementusers

热门问题