How do I configure a Python interpreter in Intelli

2019-01-21 08:39发布

问题:

There is a tutorial in the IDEA docs on how to add a Python interpreter in PyCharm, which involves accessing the "Project Interpreter" page. Even after installing the Python plugin, I don't see that setting anywhere.

Am I missing something obvious?

回答1:

With the Python plugin installed, navigate to File > Project Structure. Under the Project menu for Project SDK, select "New" and select "Python SDK", then select "Local". Provided you have a Python SDK installed, the flow should be natural from there - navigate to the location your Python installation lives.



回答2:

So here is a simple project, where I have used Selenium and added that using external path

Now you need to open Project Structure and go to SDK Section

Now Select your project's virtual environment. In the Classpath tab add the PYTHONPATH by clicking + button

and now the modules will be recognized



回答3:

Follow these steps:

  1. Open Setting (Ctrl + Alt + s)
  2. Click on plugins
  3. Find Browse Repositories and click
  4. Search for "python"
  5. Select Python SDK or pycharm
  6. Restart the IDE
  7. Go to project structure
  8. Select the python SDK in projects or create a new project with python SDK.


回答4:

For Pycharm users:

FileSettingsProject: MyProjectProject Interpreter