【发布时间】:2019-07-03 17:36:35
【问题描述】:
我正在尝试编写一些需要 ropper 的脚本。 (只能通过 pip 安装) 我该如何解决这个问题?
我正在尝试在 linux 上安装它,尝试升级 setuptools,安装旧版本并遵循此,只有一个主题,我发现: the link!
这是错误信息:
$ pip install ropper
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting ropper
Using cached https://files.pythonhosted.org/packages/94/b1/922dfab5083ff439ce70358c7f3e49185c54e6ea6ee2bb7cd292e63eac06/ropper-1.12.1.tar.gz
Collecting filebytes>=0.9.18 (from ropper)
Using cached https://files.pythonhosted.org/packages/0b/3a/9fc0c62bd74583137a8bbc3c8020d6a8234b9cf8bc1e99fe929688b19093/filebytes-0.9.20.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-d44HeD/filebytes/setup.py", line 3, in <module>
from pathlib import Path
ImportError: No module named pathlib
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-d44HeD/filebytes/
【问题讨论】:
-
您似乎正在使用 Python 2 安装 Python 3 版本(
pathlib来自 Python 3 stdlib)。如果模块作者忘记将其作为依赖项包含在内,我想您可以尝试从pypi.org/project/pathlib2 安装反向端口并重试。 -
我猜你的机器上可能同时有 Python 2.7 (
python) 和 Python 3.x (python3),同样可能有两个版本的 pip,pip和 @987654328 @...?检查pip使用哪个Python 版本:pip --version应该输出类似pip 19.1.1 from /home/user/.local/lib/python3.6/site-packages/pip (python 3.6)的内容。也许尝试使用pip3,如果它已定义?