鱼C论坛

 找回密码
 立即注册
查看: 1447|回复: 6

win10 安装requests模块问题

[复制链接]
发表于 2020-7-26 21:32:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
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 [packages]…
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'

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2020-7-26 21:36:41 | 显示全部楼层
 pip install requests 
pip install requests 试试
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-7-26 21:55:55 | 显示全部楼层
pip install request  -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
上面鱼油的方法不行的话,试试我的。
在cmd中输入回车即可
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-7-27 02:19:35 | 显示全部楼层
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.


这里都说了,需要运行 pipenv shell ,虚拟环境才生效
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-7-27 08:09:25 From FishC Mobile | 显示全部楼层
没必要安装虚拟环境工具pipenv吧?
直接pip install requests就可以了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-7-27 08:55:51 | 显示全部楼层
pipenv只对虚拟环境生效。试试python -m pip install requests
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-7-28 12:20:13 | 显示全部楼层
谢谢各位大佬
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-1-19 17:10

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表