参考文章
mac下PyCharm的简单使用教程
Windows下pycharm基础使用方法
PyCharm下载
PyCharm 导入第三方库或者模块
1、 命令窗口操作(⚠️:把当前目录切换到Python的安装目录)
pip install tqdm
⚠️(1)import tqdm
导入东西时需要加入模块名tqdm的限定
(2)from tqdm import *
:不需要
2、界面操作
点击“File”—>“Settings”—>找到自己文件下的“Project Interpreter”---->点击最右边的“+”—>在搜索框中输入要导入的库名称---->点击“Install Package”。
3. 界面内根据提示添加
⚠️错误:【No Python interpreter configured for the project】
解决方法:添加Python interpreter
选择“Show All”
⚠️错误:TypeError: ‘module’ object is not callable
解决方法:使用from tqdm.autonotebook import tqdm
或者from tqdm import *
Pycharm代码格式化快捷键即其设置
- windows : ctrl+alt+L
- Mac: command+option+L