Tensorflow安装小记

2019-07-05  本文已影响0人  昵称又重复

手把手教你如何安装Tensorflow(Windows和Linux两种版本)
https://blog.csdn.net/cs_hnu_scw/article/details/79695347

Python一键安装全部依赖包
https://blog.csdn.net/qq_37925422/article/details/79646462

CentOS下编译64位的libpython2.6.so.1.0库
https://blog.csdn.net/inte_sleeper/article/details/6614190

python lib 库下载
https://centos.pkgs.org/6/centos-x86_64/python-libs-2.6.6-66.el6_8.x86_64.rpm.html

技术博客
https://www.cnblogs.com/wangxiaoqiangs/category/807645.html
http://www.cnblogs.com/chongdongxiaoyu/p/9511386.html

安装pip
下载对应的tar包
https://blog.csdn.net/qq_27275447/article/details/80065535

2.6版本的
wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b4
86df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=
35f01da33009719497f01a4ba69d63c9

[root@localhost ~]# tar xf pip-9.0.1.tar.gz
[root@localhost ~]# cd pip-9.0.1
[root@localhost pip-9.0.1]# python3 setup.py install

pip show Package:显示已安装的模块信息
pip show traitlets

+++++++++++++++++++
libpython2.6.so.1.0: cannot open shared object file: No such file or directory
安装nginx中需要Python2.6的支持,下面介绍如何安装Python2.6,并建立lib的连接

tar 包安装pip

tar -xzvf pip-1.5.4.tar.gz

cd pip-1.5.4

python setup.py install

++++++++++++++++++++++++++++++
python升级导致yum命令无法使用的解决办法
报错
[root@develop bin]# yum
[root@develop local]# yum -y install prce
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.1 (r261:67515, Aug 7 2010, 11:36:17)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq

2、查看yum版本
[root@develop local]# rpm -qa |grep yum
yum-3.2.8-9.el5.centos.1
yum-metadata-parser-1.1.2-2.el5

3、查看python版本
[root@develop local]# whereis python
python: /usr/bin/python2.4 /usr/bin/python /usr/lib/python2.4 /usr/local/bin/python2.6 /usr/local/bin/python2.6-config /usr/local/bin/python /usr/local/lib/python2.6 /usr/share/man/man1/python.1.gz

4、执行python,查看到使用2.6.1的版本
[root@develop local]# python
Python 2.6.1 (r261:67515, Aug 7 2010, 11:36:17)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

5、猜测yum调用了高版本的python。

6、解决方法:
查找yum和 yum-updatest文件,并编辑此py文件

!/usr/bin/python

改为:

!/usr/bin/python2.4

然后保存OK.

+++++++++++++++++++++++++

需要注意的问题
lib64

lib

修改指定python
vi /usr/bin/yum

++++++++++++++++
查看yum版本
rpm -qa |grep yum

++++++++++++++++++
There was a problem importing one of the Python modules
required to run yum.

+++++++++++++++
bash: pip: command not found... 解决方法
wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate

? ?
?tar -axf pip-1.5.4.tar.gz
? ? ?cd pip-1.5.4/
? ? ?python setup.py install

安装完后,
使用 pip -V 报错,如下:

bash: pip: command not found...

这时候怎么办呢??

做一个软连接即可:

首先查下安装路径:

find / -name pip

然做个软连接

ln -sv /usr/local/python/bin/pip /usr/bin/pip

做完就可以用了。

路径要根据你自己的进行改变。
++++++++++++++++++++++++++++

安装python时出现Ignoring ensurepip failure:pip required SSL/TLS和There are no enabled repos
安装python时出现Ignoring ensurepip failure:pip required SSL/TLS

因为没有安装OpenSSL

使用yum install openssl-devel;

但是我的安装出现 There are no enabled repos....

好像是因为没有配置yum 源;处理半天解决不了

直接安装openssl-devel ? ? ? ?
sudo apt-get install libssl-dev

就可以了

+++++
python ImportError: /lib64/libc.so.6: version `GLIBC_2.16' not found
错误原因:
glibc版本过低
查看glibc版本
strings /lib64/libc.so.6 | grep GLIBC_
http://ftp.gnu.org/gnu/libc/ 下载源代码
安装GLIBC_
参考链接地址:https://my.oschina.net/zhangxu0512/blog/262275

centos卸载python
https://www.cnblogs.com/phpandmysql/p/7066399.html
+++++++++++++++++++++++++++++++++++++++++++
yum 安装一个软件包,出现如下错误;
?-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: 没有那个文件或目录

查看yum和python的rpm是否安装,系统已安装yum和python的的rpm包。
查看一下系统命令:

ls -l? ?/usr/bin/yum??? #yum命令存在

-rwxr-xr-x 1 root root 801 6月? 23 16:54 /usr/bin/yum

ls -l ?python? #原因在这

cd /usr/bin/? 找不到python命令

解决办法:
重新做一个python的软连接,用系统的python的rpm包python2.6;问题解决。

ln -s /usr/bin/python2.6 /usr/bin/python


作者:anning_88
来源:CSDN
原文:https://blog.csdn.net/anning_88/article/details/75735757
版权声明:本文为博主原创文章,转载请附上博文链接!
+++++++++++++++++++++++++++++++++++++++++++++++++++++

上一篇下一篇

猜你喜欢

热点阅读