关于Python中pip install 各种包下载不下来的问题解决办法

     你们有可能报安装不成功或者下面这个问题(!!!已经安装了但并非在你的Python安装路径下

     

C:\Users\xxx>pip install ddt
Requirement already satisfied: ddt in e:\anaconda\lib\site-packages (1.6.0)

  1.首先找到你Python的安装路径

        win+R,输入cmd打开命令窗口

where python

 以我的为例:我选择的路径是第二个

C:\Users\xxx\AppData\Local\Programs\Python\Python38

 2.此时不要输入pip install xxx(包名),而是在pip install --target== Python对应的路径\Lib\site-pages 目录

以安装ddt包为例

输入

pip install --target==C:\Users\xxx\AppData\Local\Programs\Python\Python38\Lib\site-pages ddt

问题应该就解决了

你可能感兴趣的:(pip,python,测试工具)