当前位置:网站首页>Install keras, tensorflow, and add the virtual environment to the Jupiter notebook
Install keras, tensorflow, and add the virtual environment to the Jupiter notebook
2022-07-28 20:27:00 【Cute and strange】
Write it in front of you :
Need to use... Recently LSTM, Today we start to build the environment , A lot of problems , There are mainly two problems , Friends who don't know much about the installation environment can pay attention :
1、tensorflow and keras as well as numpy And so on . General keras Installation tutorial tensorflow and keras The versions are all compatible , But I have to pretend numpy, Accidentally, the version is incompatible , So every step of my installation specifies the version , Prevent incompatibility problems ;
2、 Because I'm not used to it pycharm, therefore keras After installation, I want to use jupyter open , As a result, we encountered various problems . For example, I can't recognize jupyter notebook This order and so on . So I simply changed my mind , First, add the virtual environment to jupyter in , Then pack in the virtual environment .
The following is the whole process of my installation , They are all mirrors of Tsinghua garden , The network speed is good, and you can install it all in twoorthree minutes !
——————————————————————————————————————————
First step : Creating a virtual environment (tf3 Is the name of my virtual environment , You can pick it up by yourself )
conda create -n tf3 python=3.6.5
The second step : install ipykernel
pip install ipykernel -i https://pypi.tuna.tsinghua.edu.cn/simple/The third step : Put the new virtual environment (tf3) Add to jupter notebook Inside
python -m ipykernel install --name tf3
Up to here , Virtual environment is added to jupter notebook Inside the , Next, install into the virtual environment tensorflow and keras
First step : First, enter the new virtual environment
conda activate tf3The second step : install tensorflow
pip install tensorflow==2.3.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/The third step : install keras
pip install keras==2.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple/Step four : install numpy
pip install numpy==1.19.5 -i https://pypi.tuna.tsinghua.edu.cn/simple/Step five : install pandas
pip install pandas==1.1.4 -i https://pypi.tuna.tsinghua.edu.cn/simple/Step six : install scikit-learn
pip install scikit-learn==0.24.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/Step seven : install scipy
pip install scipy==1.5.4 -i https://pypi.tuna.tsinghua.edu.cn/simple/Step eight : install matplotlib
pip install matplotlib==3.3.3 -i https://pypi.tuna.tsinghua.edu.cn/simple/Last in jupyter notebook Introduce related libraries , If no error is reported, it means ok 了
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import Dropout
边栏推荐
- Scene thread allocation in MMO real-time combat games
- Wildcard ssl/tls certificate
- HSETNX KEY_ Name field value usage
- [C language] function
- C language - pointer
- 树行表达方式
- [C language] header file of complex number four operations and complex number operations
- 6. Functions of C language, why functions are needed, how functions are defined, and the classification of functions
- 【CodeForces】Educational Codeforces Round 132 (Rated for Div. 2)
- Common commands of raspberry pie
猜你喜欢
随机推荐
有哪个老哥知道flinksql 日志很大要怎么解决吗
Solve the brick stacking problem (DP)
Other IPS cannot connect to the local redis problem solving and redis installation
最大交换[贪心思想&单调栈实现]
Introduction to seven kinds of polling (practice link attached)
Wildcard ssl/tls certificate
Leetcode-297 serialization and deserialization of binary tree
Solve the kangaroo crossing problem (DP)
Solutions to the environment created by Anaconda that cannot be displayed in pycharm
1、 Relationship among CPU, memory and hard disk
[C language] Pointer advanced knowledge points
mmo及时战斗游戏中的场景线程分配
9. Pointer of C language (5) how many bytes does the pointer variable occupy
Store and guarantee rancher data based on Minio objects
C language data 3 (2)
产品力大幅提升 新款福特探险者发布
LeetCode-297-二叉树的序列化与反序列化
5. Difference between break and continue (easy to understand version)
New fruit naming (DP is similar to the longest common subsequence)
Common instructions of vim software






![[C language] Fibonacci sequence [recursion and iteration]](/img/02/6cff776db583f1b149686e15649d41.png)


