I create an virtual environment in my conda named 'keras_ev' and install the keras in it by
conda install keras
after that when i
activate keras_ev
jupyter notebook
the notebook does not show my keras_ev environment
and i fail to import the keras in my notebook.
Does anybody know how to fix this! Thank you
Try conda install ipykernel
in your keras_ev
environment. Then it should appear in your Jupyter notebook.
You can also install Python dependencies while using your Jupyter notebook. First, activate the environment keras_ev
in another terminal tab. Then install your dependency using conda or pip (conda is recommended). It should be something like the text below.
In a new terminal:
source activate keras_ev
conda install *your_package*
In order for Keras to work you should first install one of its backends. If you don't install any of the backends it won't work, although it seems that it is installed. please refer to here .
If you have anaconda navigator installed, you can manually go there and click the environments panel (make sure to go to your preferred environment, there is a button in which you can select this)and add Keras. Then, if you run any application off of anaconda, it will automatically have Keras.
After install that setup the anaconda environment and you need to create new environment using anaconda prompt or command prompt or terminal
conda create -n yourEnvName python=3.6
Now you can activate your environment using follwing command
activate yourEnvName
Now install keras using PIP. Before install keras you need to install tensorflow because keras run top of the tensorflow
pip install tensorflow
pip install keras
try this for activate the enviroment:
conda activate keras_ev
now, try to start the jupyter notebook using
jupyter notebook
or
jupyter lab
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.