win10 安装requests模块问题
1、cmd界面安装报错pip install pipenv
Requirement already satisfied: pipenv in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (2020.6.2)
Requirement already satisfied: pip>=18.0 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from pipenv) (20.1.1)
Requirement already satisfied: virtualenv-clone>=0.2.5 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from pipenv) (0.5.4)
Requirement already satisfied: virtualenv in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from pipenv) (20.0.25)
Requirement already satisfied: certifi in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from pipenv) (2020.6.20)
Requirement already satisfied: setuptools>=36.2.1 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from pipenv) (41.2.0)
Requirement already satisfied: six<2,>=1.9.0 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from virtualenv->pipenv) (1.15.0)
Requirement already satisfied: distlib<1,>=0.3.0 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from virtualenv->pipenv) (0.3.1)
Requirement already satisfied: filelock<4,>=3.0.0 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from virtualenv->pipenv) (3.0.12)
Requirement already satisfied: appdirs<2,>=1.4.3 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from virtualenv->pipenv) (1.4.4)
C:\Users\Administrator>$ pipenv install requests
'$' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Users\Administrator>pipenv install requests
Installing requests…
Adding requests to Pipfile's …
Installation Succeeded
Installing dependencies from Pipfile.lock (fbd99e)…
================================ 0/0 - 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
2、pathon界面 输入requests后报错
import requests
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
pip install requests pip install requests 试试
pip install request-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
上面鱼油的方法不行的话,试试我的。
在cmd中输入回车即可
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
这里都说了,需要运行 pipenv shell ,虚拟环境才生效 没必要安装虚拟环境工具pipenv吧?
直接pip install requests就可以了 pipenv只对虚拟环境生效。试试python -m pip install requests 谢谢各位大佬
页:
[1]