linux服务器:安装古老版本的tensorflow(1.2.0)

1.pip现在支持安装的版本:

在这里插入图片描述

2.只能用官方的包:(该数字就会到你想要的版本官网)

cpu:https://pypi.org/project/tensorflow/1.2.0/#files
gpu:https://pypi.org/project/tensorflow-gpu/1.3.0/#files

3.传到服务器上,我用的winSCP

4.安装

pip Install 文件

5.如果出现:xxx.whl is not a supported wheel on this platform

说明pip的版本不对,用pip2,或,pip3尝试

6.若出现:ERROR: Cannot uninstall ‘Markdown’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

首先尝试

pip2 uninstall  Markdown

然后再次执行

7.如果有:

在这里插入图片描述
即手动卸载不了,提示需要更新python2到最新的版本。
参考:

https://blog.csdn.net/haijiege/article/details/77641778?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-1&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-1

选择更改为python2最新包:

https://www.python.org/ftp/python/

8,在上述中如果删除了/usr/bin下的,但是之后没有成功,会发现所有的需要用到python的都会出错,比如我把python2删除了,导致yum无法使用了。

很简单,复制一个:

cp /usr/bin/python2.7 /usr/bin/python

第一个参数是要复制的,第二个参数是新生成的,复制后,我在全局中使用python,就相当于使用python2.7.
但是如果你把python2.7等其他的也给删了,(我的删不了),那此方法不适用。

9,又遇到了yum无法使用,这是因为自己把python默认改为了python2,而应该使用的是python:

参考:

https://www.cnblogs.com/YCcc/p/11077456.html

。很简单,就是连个文件下python改成python2
/usr/libexec/urlgrabber-ext-down 和 /usr/bin/yum

.

原创文章 397 获赞 284 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_42721412/article/details/105783023