Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm cannot find installed packages: keras

I installed pycharm-2016.1.4 in my PC running Ubuntu 14.04. I have installed Keras (a Python package) using pip install keras and PyCharm can find it before. But it cannot find Keras now. I do not modify any settings, so this problem may be wired. My Python version is Python 2.7.

enter image description here

I use pip list to verify that I have Keras installed:

enter image description here

But check this package in PyCharm by using: Settings -> Project -> Project Interpreter. Keras is NOT in the package list. (The interpreter used is the same as the result of which python in terminal).

like image 984
Dong Li Avatar asked Sep 21 '16 14:09

Dong Li


People also ask

Why packages are not installing in PyCharm?

The most viable troubleshooting action is to try installing the problematic package on the selected Python interpreter using the terminal. If you get an identical error message, then the problem is not in the IDE and you should review the rationales and typical cases, or search for a solution on the Internet.

How do I use installed packages in PyCharm?

Expand the list of the available versions in the upper-right corner of the tool window. Select the required version or keep it the latest. Click the Install button next to the version list. Once PyCharm notifies you about successful installation, you should see the package in the list of the installed packages.


2 Answers

This is strange, but you can install Keras directly through Pycharm.

You can follow this steps:

  • Go to Settings -> Project -> Project Interpreter
  • Click on plus icon in the top-right corner
  • Search Keras and press on Install Package

Please let me know if this procedure solve your issue.

like image 179
Giordano Avatar answered Nov 08 '22 08:11

Giordano


I do not know what happened, but the problem solved with the following steps.

  1. Uninstall old keras
  2. Re-install keras: pip install keras

Then I can import keras in pycharm.

NOTE: It is strange since I have keras installed but cannot find it in Project Interpreter's package list.

like image 37
Dong Li Avatar answered Nov 08 '22 07:11

Dong Li