尝试 pip install cantools 时退出状态 1
exit status 1 when trying to pip install cantools
每当我尝试 pip install cantools==34.0.0(在 python 2.7 上)
我收到错误:
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
Collecting cantools==34.0.0
Using cached cantools-34.0.0-py2.py3-none-any.whl (77 kB)
Collecting diskcache
Using cached diskcache-5.0.2.tar.gz (47 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\setup.py'"'"'; __file__='"'"'c:\
users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\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 'c:\users\bla\appdata\local\temp\pip-pip-egg-info-mxhtc0'
cwd: c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\
Complete output (10 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\setup.py", line 5, in <module>
import diskcache
File "diskcache\__init__.py", line 9, in <module>
from .core import (
File "diskcache\core.py", line 434
raise ValueError('disk must subclass diskcache.Disk') from None
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
谁能帮帮我?它似乎在尝试安装软件包 diskcache
时发生
我修好了,问题出在安装磁盘缓存模块上,
默认情况下,它尝试安装 python 3 版本支持的版本
当我手动安装它时 pip install diskcache==4.1.0
然后再次安装 cantools 它成功了。
每当我尝试 pip install cantools==34.0.0(在 python 2.7 上) 我收到错误:
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
Collecting cantools==34.0.0
Using cached cantools-34.0.0-py2.py3-none-any.whl (77 kB)
Collecting diskcache
Using cached diskcache-5.0.2.tar.gz (47 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\setup.py'"'"'; __file__='"'"'c:\
users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\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 'c:\users\bla\appdata\local\temp\pip-pip-egg-info-mxhtc0'
cwd: c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\
Complete output (10 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\bla\appdata\local\temp\pip-install-4or8zd\diskcache\setup.py", line 5, in <module>
import diskcache
File "diskcache\__init__.py", line 9, in <module>
from .core import (
File "diskcache\core.py", line 434
raise ValueError('disk must subclass diskcache.Disk') from None
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
谁能帮帮我?它似乎在尝试安装软件包 diskcache
时发生我修好了,问题出在安装磁盘缓存模块上,
默认情况下,它尝试安装 python 3 版本支持的版本
当我手动安装它时 pip install diskcache==4.1.0
然后再次安装 cantools 它成功了。