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

查看:444
本文介绍了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天全站免登陆