IDEA maven project integration python

1. First, python or anaconda has been installed locally
. 2. If you want to integrate python in IDEA, you must install the python plugin first
. , the latter cannot automatically import the classpath
to import python sdk in detail, select anaconda ------>existed environment


Since I'm importing a complete maven project with a python(tf) module in it. There is only one module by default, so at the beginning, the default java compiler, python programs cannot run

new -->module -> from existing sources -> import this python module. The path does not need to be changed, and then we will find that there is a Python module
insert image description here
Apply in the project structure. At this time, the basic commands in the python file, such as print, have no red wavy lines.
insert image description here


If you have installed tensorflow
before, you should choose the tf environment here.
Since I need 2.x now, reinstall it and
open the anaconda prompt
pip install -i https://pypi.doubanio.com/simple/ tensorflow
(as of 2021.10 , the latest version 2.6, the domestic mirror is used on it)
https://blog.csdn.net/Tchalla/article/details/114955778

PS: I also encountered the problem that PIP was not available in the middle. The solution is as follows
https://blog.csdn.net/haihonga/article/details/100168691/
ERROR: Cannot uninstall 'wrapt' problem solution:
https://blog.csdn .net/weixin_40200315/article/details/93191040
which can be replaced with Douban source
pip install -i https://pypi.doubanio.com/simple/ --upgrade tensorflow

Guess you like

Origin blog.csdn.net/kunAUGUST/article/details/120589077