ERROR: Could not find a version that satisfies the requirement python3-dev (from versions: none)

初步认为是pip版本太低导致无法查询到

  pip --version

发现版本为21.3.1

pip 21.3.1 from f:\anaconda3\lib\site-packages\pip-21.3.1-py3.7.egg\pip (python 3.7)

更新一下

easy_install --upgrade pip

结果

WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for pip
Reading https://pypi.org/simple/pip/
Downloading https://files.pythonhosted.org/packages/96/2f/caec18213f6a67852f6997fb0673ae08d2e93d1b81573edb93ba4ef06970/pip-22.1.2-py3-none-any.whl#sha256=a3edacb89022ef5258bf61852728bf866632a394da837ca49eb4303635835f17
Best match: pip 22.1.2
Processing pip-22.1.2-py3-none-any.whl
Installing pip-22.1.2-py3-none-any.whl to f:\anaconda3\lib\site-packages
Removing pip 21.3.1 from easy-install.pth file
Adding pip 22.1.2 to easy-install.pth file
Installing pip-script.py script to F:\Anaconda3\Scripts
Installing pip.exe script to F:\Anaconda3\Scripts
Installing pip3-script.py script to F:\Anaconda3\Scripts
Installing pip3.exe script to F:\Anaconda3\Scripts
Installing pip3.10-script.py script to F:\Anaconda3\Scripts
Installing pip3.10.exe script to F:\Anaconda3\Scripts

然而并没有什么用,依然报错。

pip install python3-dev -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple/
ERROR: Could not find a version that satisfies the requirement python3-dev (from versions: none)
ERROR: No matching distribution found for python3-dev

看了一下其他资料,也许这个包名不是python3-dev呢?
或许是python-dev,说试就试!

>pip install python-dev -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple/
Collecting python-dev
 Downloading http://pypi.doubanio.com/packages/62/a7/2a6a6a6a89547156ecc65fc14c561aca88cdb20236b6aac8e9a9dc7b37e0/Python-dev-2.0.0.dev0.tar.gz (619 kB)
    ---------------------------------------- 619.5/619.5 kB 1.2 MB/s eta 0:00:00
 Preparing metadata (setup.py) ... done
Requirement already satisfied: Werkzeug>=0.15 in f:\anaconda3\lib\site-packages (from python-dev) (1.0.0)
Requirement already satisfied: Jinja2>=2.10.1 in f:\anaconda3\lib\site-packages (from python-dev) (2.11.1)
Requirement already satisfied: itsdangerous>=0.24 in f:\anaconda3\lib\site-packages (from python-dev) (1.1.0)
Requirement already satisfied: click>=5.1 in f:\anaconda3\lib\site-packages (from python-dev) (7.0)
Requirement already satisfied: MarkupSafe>=0.23 in f:\anaconda3\lib\site-packages (from Jinja2>=2.10.1->python-dev) (1.1.1)
Building wheels for collected packages: python-dev
 Building wheel for python-dev (setup.py) ... done
 Created wheel for python-dev: filename=Python_dev-2.0.0.dev0-py3-none-any.whl size=89171 sha256=47c75b85a15c0a90c719920285a49dc49f812cc5a568a43500f00a81c54fff6a
 Stored in directory: c:\users\hp\appdata\local\pip\cache\wheels\bc\d6\bc\d588dbdd02c525d88a4926327cf2ef71f969cb1dae0c33fbbd
Successfully built python-dev
Installing collected packages: python-dev
Successfully installed python-dev-2.0.0.dev0

大功告成

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
根据引用中的错误信息,错误提示了找不到满足要求的python3-dev版本。这可能是由于安装源的问题导致的。可以尝试更换安装源,例如使用国内的镜像源,如豆瓣源。可以使用以下命令进行安装: pip install python3-dev -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 根据引用中的信息,你目前使用的测试框架是基于Python2.7.5,但你已经安装了Python3,导致部分库运行不兼容。此外,你在使用Python2安装库时也遇到了错误。这可能是因为库不支持Python2版本或者你在安装过程中遇到了其他问题。 最后,根据引用中的版本信息,你的pip版本为21.3.1,并且是在Python 3.7环境下安装的。 总结来说,你遇到的问题是找不到满足要求的python3-dev版本和在Python2环境下安装库时报错。解决方法包括更换安装源以及确认库是否支持Python2版本。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [ERROR: Could not find a version that satisfies the requirement python3-dev (from versions: none)](https://blog.csdn.net/william_andy/article/details/125728163)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [解决Python安装库报错: Could not find a version that satisfies the requirement mongoalchemy (from ...](https://blog.csdn.net/jlhx123456/article/details/114532071)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值