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

大功告成

你可能感兴趣的:(python)