美文网首页
将python更新到指定版本

将python更新到指定版本

作者: 白雪乌鸦 | 来源:发表于2022-08-16 14:40 被阅读0次

打开Anaconda Prompt

conda update conda

conda creat -name py27 python=2.7 anaconda

activate python27  切换到2.7环境

source deactivate python27返回默认环境

conda remove --name python27 --all删除已经有环境

检测python版本:conda info -e

检查环境:

pip -V

python -V

conda -V

更新方法:

打开anaconda prompt

conda update conda

conda update anaconda

conda update python

查看应该下载何版本的.whl文件:

import pip._internal

print(pip._internal.pep425tags.get_supported())

安装tensorflow:

conda creat --name tensorflow python=3.6 anaconda(python的版本和自己电脑的一致)

activate tensorflow

pip install tensorflow

安装tensorflow出现动态链接库初始化例程失败:库的版本过高

pip uninstall tensorflow

pip install --ignore-installed --upgrade tensorflow==1.5(pip install tensorflow==1.5)

相关文章

网友评论

      本文标题:将python更新到指定版本

      本文链接:https://www.haomeiwen.com/subject/euyhgrtx.html