PyCharm cannot find installed packages: keras
Question:
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.
I use pip list
to verify that I have Keras installed:
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).
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.
I do not know what happened, but the problem solved with the following steps.
- Uninstall old keras
- 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.
To clearify Giordano’s answer:
- You should have installed tensorflow or any other framework where keras can be used on top of.
- Create a virtualenv and set this as your project interpreter. This is a working solution for me: Installing tensorflow on Pycharm (Mac)
- Got to preferences -> Project: -> Project Interpreter
- Click on the plus sign on the bottom left corner
- Search Keras and install the package.
My solution:
if you ever have installed in python:
- Go to File->Settings->Project->Project Interpreter
- Click the gear-> Add..->System interpreter
- Choose the python version that have installed keras
I am running through a training video series and, with Conda installed on my Centos 7 system, I could not get Keras to load properly. My solution was to use VirtualEnv for my Python Interpreter. I followed the steps here: https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add_new_project_interpreter
Use
import tensorflow.python.keras
instead.
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.
I use pip list
to verify that I have Keras installed:
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).
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.
I do not know what happened, but the problem solved with the following steps.
- Uninstall old keras
- 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.
To clearify Giordano’s answer:
- You should have installed tensorflow or any other framework where keras can be used on top of.
- Create a virtualenv and set this as your project interpreter. This is a working solution for me: Installing tensorflow on Pycharm (Mac)
- Got to preferences -> Project: -> Project Interpreter
- Click on the plus sign on the bottom left corner
- Search Keras and install the package.
My solution:
if you ever have installed in python:
- Go to File->Settings->Project->Project Interpreter
- Click the gear-> Add..->System interpreter
- Choose the python version that have installed keras
I am running through a training video series and, with Conda installed on my Centos 7 system, I could not get Keras to load properly. My solution was to use VirtualEnv for my Python Interpreter. I followed the steps here: https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add_new_project_interpreter
Use
import tensorflow.python.keras
instead.