因为我已经安装了python版本2.7作为主系统版本,所以我一直在尝试在python idle shell 3.6中使用子进程调用来安装'telepot‘。
我使用此代码安装
from subprocess import call
call(['install', 'telepot'])
1
import telepot有一次我成功地导入了这个库,但下一次它再次显示
ModuleNotFoundError:没有名为'telepot‘的模块
我也试过
call(['pip', 'install', 'telepot']) 但它失败了。那么我应该怎么做才能在不使用命令行或终端的情况下在python shell中安装它呢?
发布于 2020-07-23 04:16:04
所以首先你需要打开命令行(按Win +R并在那里写'cmd.exe',按ok)
然后在那里写下cd C:\Users\YOUR_USERNAME\AppData\Local\Programs\Python\Python36-32\Lib\site-packages
然后编写pip install telepot
完成)
https://stackoverflow.com/questions/63041989
复制相似问题