将目录添加到 PyCharm 中的 Python 路径? [英] Add directory to Python path in PyCharm?

查看:51
本文介绍了将目录添加到 PyCharm 中的 Python 路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在 PyCharm 中使用 paraview.simple 库.我的电脑上已经安装了paraview.这个包不能用 pip 安装,据我所知没有 .whl 文件.网站 docs 推荐目录包含所有 python 文件的文件被添加到 PYTHONPATH.

I want to be able to use the paraview.simple library in PyCharm. I already have paraview installed in my computer. This package cannot be installed with pip and there are no .whl files as far as I can tell. The website docs recommend that the directory containing all the python files be added to PYTHONPATH.

如何在 PyCharm 会话的 PYTHONPATH 中添加相关文件夹,并默认将其保留在那里,以便当我关闭并重新打开 paraview.simple 库时仍然可用?>

How do I add the relevant folder in PYTHONPATH on my PyCharm session, and keep it there by default, such that when I close out and reopen the paraview.simple library is still available?

推荐答案

您可以通过这种方式添加自定义路径.

You can add custom paths this way.

  • 转到文件->设置->项目解释器
  • 在 Project-Interpreter 字段中,单击向下的箭头并选择全部显示"
  • 在该菜单中,突出显示您的解释器,然后在右侧菜单中,选择显示所选解释器的路径"按钮(这是最后一个按钮)
  • 点击加号添加您的路径

这篇关于将目录添加到 PyCharm 中的 Python 路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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