[Tutor] How to work with a later version of Python

Mats Wichmann mats at wichmann.us
Fri Oct 2 19:40:04 EDT 2020


On 10/2/20 12:15 PM, Neveills, Sarah wrote:
> All,
> 
> I cannot import the keras package in version 3.8.3.
> 
> It states no module named ‘keras’
> 
> Any suggestions?
> 
> Sarah

Probably, it's not installed.

Each version of Python gets its own installation area, so a package
installed for a different Python version would not get picked up.

Keras itself, it looks like, has no version issues.  You can check these
things by going to PyPI:

https://pypi.org/project/Keras/#files

The naming of the installable suggests it's very flexible:

Keras-2.4.3-py2.py3-none-any.whl

that is, there's no Python version dependency, there's no operating
system dependency, and there's no processor architecture dependency.

So with the Python you intend to use, try:

python -m pip install keras

That has a good chance of taking care of the import problem.



More information about the Tutor mailing list