PyCharm and external libraries(PyCharm 和外部库)
问题描述
我已经开始使用 PyCharm IDE,但我无法确定如何在那里管理外部库.例如,PyCharm 看不到 matplotlib.在 PyCharm 的文件管理器中,我清楚地看到了外部库的列表,并且没有 matplotlib.但是,我已经安装了它并且我知道它的位置.
I have started to use PyCharm IDE, but I was not able to determine how to manage external libraries there. For instance, PyCharm does not see matplotlib. In PyCharm's file manager, I clearly see the list of external libraries and there is no matplotlib. However, I have it installed and I know its location.
如何将这个库添加到 PyCharm 环境中?
How can I add this library to PyCharm environment?
推荐答案
建议使用Python虚拟环境.使用 PyCharm 真的很容易.
I suggest to use Python virtual environment. It is really easy with PyCharm.
PyCharm > 首选项... > 项目解释器 > Python 解释器
PyCharm > Preferences... > Project Interpreter > Python Interpreters
单击创建虚拟环境"并选择您的基本解释器.
Click "Create Virtual Environment" and pick your base interpreter.
单击安装"并安装您需要的任何软件包.如果默认存储库不包含所需的库,您还可以添加其他存储库.另一个好处是你可以看到哪些库有更新的版本并且可以更新.
Click "Install" and install any packages you need. You can also add other repositories if the default ones do not contain required libraries. Another benefit is that you can see which libraries have newer version and can be updated.
这篇关于PyCharm 和外部库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PyCharm 和外部库
基础教程推荐
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
