IntelliJ IDEA 14 does not recognize Python built-in types when using interpreter in virtualenv

I am using IntelliJ IDEA 14 on OSX for a Python project that uses a virtual environment. The program works fine both in the terminal and with the run command inside IDEA, but it does not recognize Python built-in types and functions.

IDEA is not recognizing Python built in types and functions

I created a virtual environment and added it to my project structure, following the instructions below, which, according to the messages I read, should work, but I can’t understand what is going wrong.

  • Added Python to venv as an SDK project.

Added Python in <code> venv </code> as the Project SDK

  1. Added Python to venv as a Python interpreter in modules.

Added Python in <code> venv </code> as Python interpreter in Modules.

  1. Added Python in venv as Python interpreter in Facets.

Added Python in <code> venv </code> as the Python interpreter in Facets.

  1. Ensure that the selected Python interpreter is the selected SDK.

Ensured that the appropriate Python interpreter is the selected SDK.

  1. These are global libraries.

These are the global libraries

[Update]

Following one of the comments below, I created a virtual environment from scratch. The built-in types for Python are now recognized, but the libraries in the venv folder are not.

Error importing modules.

Modules

+5
source share
1 answer

You need to put the Python 2.7.x interpreter library depending on your python module. Not enough SDK for python.

+3
source

Source: https://habr.com/ru/post/1212444/


All Articles