我想在 Linux Mint 中安装 osrframework 在安装过程中,它说
alex@alex-Lenovo-ideapad-320-15IAP:~$ sudo -H pip install osrframework
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 osrframework
Using cached osrframework-0.20.1.tar.gz (209 kB)
**ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bDobBZ/osrframework/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bDobBZ/osrframework/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 /tmp/pip-pip-egg-info-_c2o2O
cwd: /tmp/pip-install-bDobBZ/osrframework/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-bDobBZ/osrframework/setup.py", line 161
print(f"\t> {cmd}")
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.**
当然,您需要先安装python 版本 3:
在python 版本 3(截至 3.4)中,已经内置了pip以及venv。因此,进一步,为了安全工作,我们将创建一个默认使用python 版本 3的虚拟环境:
或(如果有任何错误):
之后,让我们启动我们的环境,默认情况下将使用python 版本 3:
命令行上的(env)确认虚拟环境正在运行。接下来,我们通过pip运行所需包的安装,如下:
如果你不想打扰虚拟环境,那么在安装python 版本 3之后,只需使用命令:
希望能帮助到你)