macOS下安装Anaconda+Tensorflow_CPU+pycharm(python3.8)
2021/4/12 20:29:45
本文主要是介绍macOS下安装Anaconda+Tensorflow_CPU+pycharm(python3.8),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
-
系统版本
-
安装过程ANACONDA官网
选择通过图形界面安装
一路继续即可(选择仅为我安装)
【注】第一次选择在磁盘上安装,结果在命令行使用conda时出现了报错,所以选择仅为我安装叭 -
设置国内镜像清华大学开源软件镜像站
1.添加Anaconda的TUNA镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
2.设置搜索时显示通道地址
conda config --set show_channel_urls yes
-
建立一个运行环境(tensorflow为我创建的运行环境名,python版本在安装anaconda时已有限制)
【注】如果电脑已有3.8.X版本需要写全,否则会自动下载3.8.8最新版本conda create -n tensorflow python=3.8
-
安装tensorflow
1.激活环境source activate tensorflow
2.安装Tensorflow(是自动选择最新还是与python对应的版本下载安装?)
pip install tensorflow
3.检测是否安装成功(进入python后)
import tensorflow as tf tf.__version__
如下图所示:
【注】version前后双下划线,exit()退出python
-
配置PyCharm
新建项目中选择刚刚配置好的虚拟环境,默认位置如下所示: -
移除环境
conda remove --name tensorflow --all
-
卸载anaconda
将Anaconda安装的目录删除
这篇关于macOS下安装Anaconda+Tensorflow_CPU+pycharm(python3.8)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-01-23供应链投毒预警 | 恶意Py包仿冒tensorflow AI框架实施后门投毒攻击
- 2024-01-19attributeerror: module 'tensorflow' has no attribute 'placeholder'
- 2024-01-19module 'tensorflow.compat.v2' has no attribute 'internal'
- 2023-07-17【2023年】第33天 Neural Networks and Deep Learning with TensorFlow
- 2023-07-10【2023年】第32天 Boosted Trees with TensorFlow 2.0(随机森林)
- 2023-07-09【2023年】第31天 Logistic Regression with TensorFlow 2.0(用TensorFlow进行逻辑回归)
- 2023-07-01【2023年】第30天 Supervised Learning with TensorFlow 2(用TensorFlow进行监督学习 2)
- 2023-06-18【2023年】第29天 Supervised Learning with TensorFlow 1(用TensorFlow进行监督学习 1)
- 2023-06-17【2023年】第28天 tensorflow的介绍
- 2023-05-16如何在 Windows10 下运行 Tensorflow 的目标检测?