Mar*_*tin 0 pip pypi python-3.x
我制作了一个pip包并上传到这里:
https://pypi.org/project/audacityDiscogsExporter/0.1.0/
如果我运行pip install audacityDiscogsExporter==0.1.0或pip install audacityDiscogsExporter收到错误消息:
martin@MSI:/mnt/c/Users/marti/Documents/projects/package$ pip install audacityDiscogsExporter
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. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement audacityDiscogsExporter (from versions: none)
ERROR: No matching distribution found for audacityDiscogsExporter
Run Code Online (Sandbox Code Playgroud)
为什么我不能安装这个包?
看起来您正在尝试使用 Python 2 解释器来安装仅限 Python-3 的项目。
在使用pip(或实际上直接使用任何其他 Python 脚本)时,确保使用哪个 Python 解释器很重要。通常调用时使用哪个Python解释器是显而易见的pip,但也经常发生不清楚的情况。最好始终明确调用确切的 Python 解释器。通常:
$ python -m pip install Something
$ # instead of 'pip install Something'
$ python3 -m pip install Something
$ # instead of 'pip3 install Something'
Run Code Online (Sandbox Code Playgroud)
如果仍有疑问,甚至可以更进一步,明确使用 Python 解释器的完整路径:
$ /usr/bin/python3.8 -m pip install Something
$ /path/to/myvenv/bin/python3 -m pip install Something
Run Code Online (Sandbox Code Playgroud)
关于该主题的有趣阅读:Brett Cannon 的文章“Why you should use python -m pip”
| 归档时间: |
|
| 查看次数: |
5209 次 |
| 最近记录: |