I am trying to install keras, theano and tensorflow on Anaconda. Following are the steps I have followed: Step 1: Created an environment 'nnet'
conda create -nnnet python=3.5 anaconda
Step 2:
activate nnet
Step 3: Installing Spyder on the new environment
conda install spyder
Step 4: Installing the packages
pip install theano
pip install tensorflow
pip install keras
Step 5: update all packages
conda update --all
Step 6: run spyder in nnet environment
Now when I run my code which tries to import keras, I get this error:
ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try
git clean -xdf
(removes all files not under version control). Otherwise reinstall numpy.Original error was: DLL load failed: The specified module could not be found.
Then I uninstalled numpy and reinstalled. However the error still persists.
Also upon checking the packages installed in anaconda navigator under nnet environment, I see tensorflow and theano missing. Here is the list I am referring to
I have used these steps before and have successfully used these packages before.(Imported and used in code) However, I am unable to figure out the issue now. Any sort of help or direction would be appreciated.
I was able to resolve it by modifying the commands in step 4:
Step 4:
conda install -c anaconda theano
conda install -c conda-forge tensorflow
conda install -c conda-forge keras
The packages now work fine and I can import them too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.