PyCharm does not recognize modules installed in development mode
As of Pycharm 2016.1.4 (professional edition), it seems that opening a different project (e.g. through Open Recent) and then opening the original one makes Pycharm reindex the installed packages and hence recognize the develop-installed packages.
This is enough for me.
PyCharm does not recognize installed package
PyCharm does not use the same python interpreter as the one you installed package for.
As @crissal said, you can use PyCharm package manager to install packages, or configure it to recognize the one you already have:
- In your cmd, type
which python
and you'll get something like/usr/bin/python
(on win it might be different but doesn't matter). That's the path of your default interpeter. - In PyCharm:
Preferences
->Project
->Python Interpreter
- Choose path if listed, or
Show all
->+
-> find and select path - Now in top right corner of the window, next to run button, select interpeter dropdown and
Edit configuration
- Select correct
Python interpreter
, give it a few moments PyCharm will figure out yournltk
dependency
I would strongly suggest using virtual environment for each project, in order not to mix dependencies.
Module not found error in PyCharm, but it is installed as an Anaconda package
Apparently the naming of the selection depends on the operating system, but the Python interpreter can be selected as follows:
- Menu File → Preferences → Project → Python Interpreter (macOS)
- Menu File → Settings → Project → Python Interpreter (Windows and Linux)
Using the dropdown, select the right Python interpreter. Depending on your OS and setup, this can be the default interpreter (e.g., ~/anaconda3/bin/python
) or the interpreter corresponding to the Conda environment of your choice (e.g., C:\users\username\.conda\envs\projectname\python.exe
).
Now all the packages installed with Anaconda should be listed.
PyCharm modules not found
It sounds like you have an anaconda environment. To install packages to your python environment in anaconda, follow the documentation.
Basically try installing packages like conda install -n Abitt scipy
. After installing the package, it should show up in your project interpreter settings.
Related Topics
Naturally Sorting Pandas Dataframe
How to Activate a Virtualenv Inside Pycharm's Terminal
How to Add an Integer to Each Element in a List
Pandas Split Column into Multiple Columns by Comma
Cs50: Like Operator, Variable Substitution with % Expansion
Python: Converting from Iso-8859-1/Latin1 to Utf-8
Appending a Dictionary to a List - I See a Pointer Like Behavior
Pandas Make New Column from String Slice of Another Column
Repeating Each Element of a Numpy Array 5 Times
Pyinstaller and --Onefile: How to Include an Image in the Exe File
How to Use Multiprocessing Queue in Python
Could Pandas Use Column as Index
Python & MySQL: Unicode and Encoding
Add X and Y Labels to a Pandas Plot
Difference Between Methods and Functions, in Python Compared to C++