当前位置:网站首页>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
边栏推荐
- WPF -- implement websocket server
- Torch. NN. Linear() function
- Using typedef in C language to change the name of data type
- robobrowser的简单使用
- 8. Compilation errors of C language and Chinese explanation
- Wildcard ssl/tls certificate
- Tree row expression
- plt. What does it mean when linestyle, marker, color equals none in plot()
- The privatized instant messaging platform protects the security of enterprise mobile business
- Reverse string
猜你喜欢

Raspberry pie CM4 -- using metartc3.0 to integrate ffmpeg to realize webrtc push-pull streaming
![[C language] print pattern summary](/img/48/d8ff17453e810fcd9269f56eda4d47.png)
[C language] print pattern summary
![[C language] use function pointers to make a different calculator](/img/58/e6ba11e054d9e45ec979224ac3e4c6.png)
[C language] use function pointers to make a different calculator

Tree row expression
![Maximum exchange [greedy thought & monotonic stack implementation]](/img/ad/8f0914f23648f37e1d1ce69086fd2e.png)
Maximum exchange [greedy thought & monotonic stack implementation]
![[C language] random number generation and `include < time. H > 'learning](/img/bb/3e47bf2e3b25653d9048884d65cda3.png)
[C language] random number generation and `include < time. H > 'learning

产品经理访谈 | 第五代验证码的创新与背景

Basic mathematical knowledge (update)
![[C language] summary of methods for solving the greatest common divisor](/img/38/3a099948ebf51fd0da3076f71f9dad.png)
[C language] summary of methods for solving the greatest common divisor

Who cares about the safety of the battery when it ignites in a collision? SAIC GM has something to say
随机推荐
[C language] print pattern summary
Related concepts of multitasking programming
Does any elder brother know how to solve the huge flinksql log
[C language] summary of methods for solving the greatest common divisor
Scheduled backup of MySQL database under Windows system
Scene thread allocation in MMO real-time combat games
Raspberrypico analytic PWM
进制及数的表示 2
[C language] advanced pointer exercise 1
CM4 development cross compilation tool chain production
Data mining (data preprocessing) -- Notes
C language - control statement
Representation of base and number 2
Durham High Lord (classic DP)
七种轮询介绍(后附实践链接)
Commands related to obtaining administrator permissions
跨区域网络的通信学习静态路由
Wust-ctf2021-re school match WP
MySQL startup error 1607 unexpected process termination
4. Const and difine and the problem of initializing arrays with const and define