pycharm自动安装模块失败了怎么办
2023-03-20 14:49:55 时间
pycharm自动安装模块失败了的解决方法:1、执行【pip -V】命令查看是否安装了pip;2、如果没有安装pip,则执行【python get-pip.py】命令进行安装;3、执行【pip install 模块名】命令安装模块即可。
问题描述:
在PyCharm中新建Web2Py项目后提示没有pymysql,自动安装失败。
(推荐教程:Python入门教程)
解决方法:
1、安装pip
在终端输入
pip -V
如果显示版本路径,就说明pip已经安装了 。如果没有安装pip,则需要在终端安装。
使用脚本安装pip:
python get-pip.py
2、安装pymysql
pip install pymysql
正常情况下以上两步就行了。
然而我的项目中依然提示没有pymysql,结果发现只是Python版本选错了。pymysql是安装到Python2.7,而PyCharm项目是用Python2.6。
解决方法:
在设置Preferences > Project Interpreter中调成Python2.7就行了。
相关文章
- ROS机器人程序设计(原书第2版)1.2.7 安装rosinstall
- 精通Python网络爬虫:核心技术、框架与项目实战.1.1 初识网络爬虫
- 精通Python网络爬虫:核心技术、框架与项目实战.1.2 为什么要学网络爬虫
- 精通Python网络爬虫:核心技术、框架与项目实战.1.3 网络爬虫的组成
- 精通Python网络爬虫:核心技术、框架与项目实战.1.4 网络爬虫的类型
- 精通Python网络爬虫:核心技术、框架与项目实战.1.5 爬虫扩展——聚焦爬虫
- 精通Python网络爬虫:核心技术、框架与项目实战.1.6 小结
- 精通Python网络爬虫:核心技术、框架与项目实战.2.1 网络爬虫技能总览图
- 精通Python网络爬虫:核心技术、框架与项目实战.2.2 搜索引擎核心
- 精通Python网络爬虫:核心技术、框架与项目实战.2.3 用户爬虫的那些事儿
- 使用jprofiler监控jruby脚本
- 精通Python网络爬虫:核心技术、框架与项目实战.2.4 小结
- 精通Python网络爬虫:核心技术、框架与项目实战.3.1 网络爬虫实现原理详解
- 精通Python网络爬虫:核心技术、框架与项目实战.3.2 爬行策略
- 精通Python网络爬虫:核心技术、框架与项目实战.3.3 网页更新策略
- 精通Python网络爬虫:核心技术、框架与项目实战.3.5 身份识别
- 精通Python网络爬虫:核心技术、框架与项目实战.3.6 网络爬虫实现技术
- 精通Python网络爬虫:核心技术、框架与项目实战.3.7 实例——metaseeker
- 精通Python网络爬虫:核心技术、框架与项目实战.3.8 小结
- SpringBoot之集成Spring AOP