IntelliJ python 开发环境



这是我的python开发目录结构 . ├── dirs │   ├── dir1 │   │   └── a.py │   ├── dir2 │   │   ├── ab.py │   │   ├── cc.py ├── py_lib │   ├── __init__.py │   ├── env.py │   ├── dir3 │   │   ├── __init__.py │   │   ├── __main__.py │   ├── abc.py │   ├── dir4 │   │   ├── __init__.py │   │   └── abc_ccc.py

a.py中,我需要从py_lib/dir4中的abc_ccc.py导入东西。 如何设置 IntelliJ 开发环境?

好吧,事实是py_lib是我们的图书馆目录。 IntelliJ 中是否有任何特定的设置来解决这种目录结构?

不知道为什么要在Python项目中使用IntelliJ。在 PyCharm 中,您可以将py_lib作为另一个Content Root添加到项目中。 https://www.jetbrains.com/help/pycharm/content-root.html

否则,打包您的库并将其安装在您的 venv 中

相关内容

最新更新