安装多个版本的TensorFlow的方法步骤
作者:PengWei 时间:2022-12-10 00:13:02
TensorFlow 2.0测试版在今年春季发布,新版本比1.x版本在易用性上有了很大的提升。但是由于2.0发布还没有多久,现在大部分论文的实现代码都是1.x版本的,所以在学习TensorFlow的过程中同时安装1.x和2.0两个版本是很有必要的。
下面是具体操作
首先需要安装Anaconda
然后进入Anaconda prompt(未避免安装失败,最好以管理员身份运行)
安装第一个版本的tensorflow:
现在是默认环境,输入要安装的第一个tensorflow版本:pip install tensorflow==版本号
pip install tensorflow==2.0.0b1
安装完成后可用以下命令检查:
conda list
找到tensorflow可查看对应版本:
若速度太慢建议使用国内源进行安装:
pip install --index-url https://pypi.douban.com/simple tensorflow==2.0.0
安装第二个版本的tensorflow:
创建一个新的环境:conda create -n 环境名
conda create -n tensorflow
安装完成后进入新环境:
activate tensorflow
再安装第二个tensorflow版本:
pip install tensorflow==1.14.0
查看tensorflow版本:
查看所安装的所有环境:
conda env list
安装好了以后怎么使用呢
以PyCharm为例
File -> settings -> project ->选择对应环境下的python解释器即可
来源:https://www.cnblogs.com/pengweiblog/p/11289674.html
标签:安装,多版本,TensorFlow
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python实现断点调试的方法
2021-07-01 07:49:40
![](https://img.aspxhome.com/file/2023/2/86182_0s.jpg)
python 详解如何使用GPU大幅提高效率
2023-08-24 19:45:46
![](https://img.aspxhome.com/file/2023/0/62550_0s.png)
asp测字符串长度及截取定长字符串汉字的处理
2007-10-12 13:14:00
js正则表达exec与match的区别说明
2024-04-17 10:25:26
简单有效上手Python3异步asyncio问题
2022-01-14 02:28:34
![](https://img.aspxhome.com/file/2023/2/68422_0s.gif)
利用python求积分的实例
2023-07-08 15:44:23
Python中内建模块collections如何使用
2022-12-31 01:43:53
如何修改vue-treeSelect的高度
2024-05-08 09:33:55
全透视:CSS Z-index 属性
2009-09-21 12:52:00
![](https://img.aspxhome.com/file/UploadPic/up/2009092113092072.gif)
[精品]ASP中常用的22个FSO文件操作函数
2007-08-18 15:12:00
![](https://img.aspxhome.com/file/UploadPic/up/2007081816282483.jpg)
软件测试面试如何测试网页的登录页面
2023-12-10 20:45:30
浅谈Scrapy框架普通反爬虫机制的应对策略
2023-07-14 17:11:40
PyCharm取消波浪线、下划线和中划线的实现
2021-11-27 02:17:27
![](https://img.aspxhome.com/file/2023/4/117974_0s.png)
SQL中的left join right join
2024-01-16 13:35:36
django实现将修改好的新模型写入数据库
2024-01-28 19:50:13
![](https://img.aspxhome.com/file/2023/0/128260_0s.jpg)
浅谈JavaScript窗体Window.ShowModalDialog使用
2024-04-23 09:05:39
python dataframe NaN处理方式
2022-12-01 18:49:33
Tensorflow 查看变量的值方法
2022-12-14 09:36:47
python人工智能tensorflow常用激活函数Activation Functions
2023-08-01 12:45:02
![](https://img.aspxhome.com/file/2023/6/67236_0s.png)
Mysql到Elasticsearch高效实时同步Debezium实现
2024-01-25 15:22:46
![](https://img.aspxhome.com/file/2023/1/93041_0s.jpg)