sotonLoon
sotonLoon

Reputation: 113

"Cannot find reference" when import from Keras

Following this example to start https://machinelearningmastery.com/tutorial-first-neural-network-python-keras/

# first neural network with keras tutorial
from numpy import loadtxt
from keras.models import Sequential
from keras.layers import Dense

Installed numpy and keras, numpy is ok, but there are red lines under "Sequential" and "Dense".

enter image description here

Here's the Error messages:

Cannot find reference 'Sequential' in 'models.py'

Cannot find reference 'Dense' in 'init.py'

enter image description here

Wonder how I can fix this? I had a look here but think it might be a different problem?

Also, on a completely different note, I can not install tensorflow for some reason? ...

enter image description here

Upvotes: 6

Views: 27168

Answers (1)

Adam
Adam

Reputation: 174

As of October 2020 Tensorflow only supports the 64-bit version of Python and Tensorflow only supports Python 3.5 to 3.8.

Update your project in PyCharm to run Python 64-bit and this should solve your problem.

Upvotes: 13

Related Questions