ERROR: Command errored
前言
最近更换本地Python2.7到3.8时报错
错误如下:
ERROR: Command errored out with exit status 1:
command: /Users/cunweizhao/Desktop/desktop_health_sdk/desktop_health_sdk/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m1/4646y4js01bb5r3md5hztvc80000gn/T/pip-install-OmybtI/websockets/setup.py'"'"'; __file__='"'"'/private/var/folders/m1/4646y4js01bb5r3md5hztvc80000gn/T/pip-install-OmybtI/websockets/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/m1/4646y4js01bb5r3md5hztvc80000gn/T/pip-pip-egg-info-EVupK4
cwd: /private/var/folders/m1/4646y4js01bb5r3md5hztvc80000gn/T/pip-install-OmybtI/websockets/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/m1/4646y4js01bb5r3md5hztvc80000gn/T/pip-install-OmybtI/websockets/setup.py", line 24, in <module>
raise Exception("websockets requires Python >= 3.4.")
Exception: websockets requires Python >= 3.4.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决办法
Exception: websockets requires Python >= 3.4.
通过上面的提示,我先查看安装的包版本是多少:
(venv) cunweizhao@bogon desktop_health_sdk % pip list
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Package Version
------------------------------ -----------
aliyun-python-sdk-core 2.13.30
aliyun-python-sdk-kms 2.14.0
altgraph 0.17
bleak 0.9.1
certifi 2020.12.5
cffi 1.14.5
chardet 4.0.0
configparser 4.0.2
contextlib2 0.6.0.post1
crcmod 1.7
cryptography 3.2.1
enum34 1.1.10
future 0.18.2
idna 2.10
importlib-metadata 2.1.1
ipaddress 1.0.23
jmespath 0.10.0
mne 0.20.8
numpy 1.16.6
oss2 2.14.0
pathlib 1.0.1
pathlib2 2.3.5
pefile 2019.4.18
pip 20.3.4
pycparser 2.20
pycryptodome 3.10.1
pyEDFlib 0.1.20
pyinstaller-hooks-contrib 2020.11
pyobjc-core 5.3
pyobjc-framework-Cocoa 5.3
pyobjc-framework-CoreBluetooth 5.3
pyobjc-framework-libdispatch 5.3
pywin32-ctypes 0.2.0
requests 2.25.1
scandir 1.10.0
scipy 1.2.3
setuptools 44.1.1
six 1.15.0
typing 3.10.0.0
typing-extensions 3.7.4.3
urllib3 1.26.3
websocket-client 0.59.0
websocket-server 0.4
wheel 0.36.2
wincertstore 0.2
zipp 1.2.0
卸载相关的websocket:
pip uninstall websocket-server
- 然后我把当前虚拟环境删除,重新安装虚拟环境,改成3.8的版本
还没有评论,来说两句吧...