PyCharm 和外部库 [英] PyCharm and external libraries

查看:36
本文介绍了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 和外部库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆