现象:安装pip后发现命令无法识别command not found

原因:which查看找到不到执行路径   find搜索发现安装后存放在/usr/local/python3.5/bin下,于是判断是因为没有注册路径的问题

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAikAAAAqCAIAAAD5+lzOAAAINElEQVR4nO2dvZGzMBCG6cEdEDpS7KEBxjEtMOMavpicFtwEiUtRMfoCQFrBSiAsg+DeZy64w7K0+n21gmOzf//+ZQCkgZCqUqpSqpLt5KO8Gz9SqqgPsS4+f62+x+Jp7d/ljH50Au0BAACwN9AeAAAAewPtAQAAsDfQHgAAAHsD7QEAALA30B4AAAB7k4j25F1Vtrc9S7y1ZaWqSk3LdV0/F/u3ZwLkhaoqKTZ/X3f9qkweouwTq6pSRb651Bj0lsd6hPe87QDWkEr/JqI9URAyuGlubcmu0a7rIG3yYqv25J2Ziqt6/yHK7piVlh3nt7aMoj0nagewgYT612gP1Tc6getiFL3pVlpInb4s+68MmZTikWVaYL3LAetnDPu4rmD11l2u+THz0G1/dlrtEbKqVClaXbWhwTNHe3rSJ4XTTs+4Il1f1Jb2mHFij5+8M+NcSKYpdpuTwfV1j/NbWxat/tQxX8br/vml2dgOvZGyLPqchwl4ZZcotB/1CCzbm1mg5ksZEQm2v3z5rCAV7aGT8NaWpgJ1rksW0hrr2m6qpVld2KveqjE3b4VbW9Kpoj91lusqy2G/q1z/9XQQksznhyjtuT23358+HZx28uMqL4yOWmduQhL1rQt9Pe+qapxLt7a0ZTgvdj+LCKzv9HcNrQvtfVc7uOZXlmUR2uEhyl4X66K/GMstS5bQfrTavC70mHStw2vWQ5qPlwPGOcOgPbP91GQYMf6ErgCzz+Lb3QOrPdR3IZ+uKJfitJ8v1389HSY6OpnbrPZ40qeDx05mXE0G2EMYP9iehHnXT+lVh3LBd8vWznmGsPpOrmf8F016Zzt45hdNvLUddEeMV5Idb7EI78e8GJcvozfuddi7Hs7ysRZJp2zsOc4ZRr/HNSfpvtI9gMh+qv+zr9L6GzAh2uMslytuwf4za491WLRCe3z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8nqgxFNKI+7K035mn/96eWAgpbTsZSZiIzW7ak2V1Edv1QfweX0H7as+Xb/z0xNH5mfaErm87xwfygvg9X2pPmnFf1sfv8dp/AEJaR1uMzMyEwchV3dFzM1ZLbG0zWuJOr0j7qKrzraAbQPweXZYjrlKY/VbpM/x7Mut8bwvOODqB2sP3Lw2KYX4PXN9+HR8oAMTvmfr+K87WnFU4Pu7Lhvg9HvsPQEhZdFI/OzD1P4i62BeZZweGRw/GT43rM3s2wZde3+z51f2ePxS/xy8/fFylQPvt9UFrp3tek/xL+e2zNrPd5Np1xmoZbh0jdlrPRASub9N2/kF8oNUgfs9JuW78Humz03kadlYQ9yUdDn/O82+B+D1n5Lrxe5weRt4xD1KfHcR9SYGzzI6rcaX/LQUAAHAOEL8HAADA3sDvuRTK8QMAAEkB7bkUrMxAewAAqQHtuRTQHgDAKUhCe57Np+f9OtqUJLm/3s0zezbv130hJbQHAHAKJtpzf70HEVha5aJxf73H4p7Np3maT7Qkfd6vfvmNC82fXh/a4PP5NE3jlcNns9BWz2Z9Uw7mMOnvr3fzXNUC0B4AwCmYa8/vZIddPK0Sydb+2Xy0EPWKuFl72HKn+Y8aQ+15NsuuWNwG49v/2XygPQCAK7GoPb0T8H7dR5fILIDGP7B1gbl+J9fsL4xyY+/6PQstzYoIRu+lrC33/nrboqJdrlD1fb3fr6cuxXxVl0xzc9pJEkxKN87ZmmNJaA8A4Az8Byik4WGmUZSYAAAAAElFTkSuQmCC" alt="" />

解决:参考地址为https://lempstacker.com/tw/Installing-Python-3-5-on-CentOS-7/

http://blog.csdn.net/apn172/article/details/8868968

1、导出头文件: /usr/local/python3.5/include

2、导出库文件: /usr/local/python3.5/lib

3、为可执行程序添加PATH路徑: /usr/local/python3.5/bin

具体执行过程如下:

[flying@lemp python3.5]$ sudo ln -sv /usr/local/python3.5/include /usr/local/include/python3                  #如果采用的是root账户就可以不加sudo      ln为添加软链接
‘/usr/local/include/python3/include’ -> ‘/usr/local/python3.5/include’
[flying@lemp python3.5]$
[flying@lemp python3.5]$ echo '/usr/local/python3.5/lib' | sudo tee /etc/ld.so.conf.d/python351.conf         #tee重定向文件,把python3.5的库文件路径写入python351.conf然后放在/etc/ld.so.conf.d下
/usr/local/python3.5/lib
[flying@lemp python3.5]$ cat /etc/ld.so.conf.d/python351.conf
/usr/local/python3.5/lib
[flying@lemp python3.5]$ sudo ldconfig -v
echo 'export PATH=$PATH:/usr/local/python3.5/bin' | sudo tee /etc/profile.d/python351.sh                     #添加环境变量

#使文件生效
source /etc/profile.d/python351.sh

centos6 安装python3.5后pip无法使用的处理的更多相关文章

  1. 安装python3.6后使用pip报错

    安装python3.6后,pip是一起安装好的,安装目录再C:\Programs\Python\Python36-32\Scripts中. 在python终端模式下使用pip出现错误如下: 错误原因: ...

  2. centos6.5下安装python3.6、pip、ipython

    一.先更换系统源 为了下载顺畅一般都会更改为国内源. 1 cd /etc/yum.repos.d/ 2 wget http://mirrors.163.com/.help/CentOS6-Base-1 ...

  3. 编译安装python3.6后pip3无法安装模块问题处理

    编译安装python3.6之后,使用pip3命令安装第三方库效果如图所示: pip is configured with locations that require TLS/SSL, however ...

  4. CentOS 7下安装Python3.6和pip

    一.安装python3.6 1.1.安装python3.6需要依赖包 yum install openssl-devel bzip2-devel expat-devel gdbm-devel read ...

  5. Linux安装python3.6 和pip

    Linux下安装Python3.6和第三方库   如果本机安装了python2,尽量不要管他,使用python3运行python脚本就好,因为可能有程序依赖目前的python2环境, 比如yum!!! ...

  6. Ubuntu16.04安装Python3.6 和pip(python3 各版本切换)

    安装: sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt-get update sudo apt-get install python ...

  7. 腾讯云centos安装python3.6和pip

    不知道腾讯云的centos和阿里云的centos一不一样,反正两个云平台的Ubuntu系统是不一样的,照着同样的教程敲,往往掉坑里. 安装一些centos依赖库: 这一步很关键,很多报错往往都因为少了 ...

  8. deepin安装Python3.6和pip

    1.安装python3.6 sudo apt-get install python3.6 2.修改软连接 sudo ln -s /usr/local/bin/python3.6 /usr/bin/py ...

  9. Ubuntu16.04安装Python3.6 和pip

    root账户,不是root账户,命令前加sudo 安装: 1.add-apt-repository ppa:jonathonf/python-3.6 2.apt-get update 3.apt-ge ...

随机推荐

  1. 待续未完- 自己写后台内容管理程序 - 用tp框架 和 前台 jquery ui等写的

    在日常开发中,我们主要使用的还是 php 的 内部的 语言本身提供的函数/常量,系统内部数组等. 为了和后面的tp框架提供的 "系统函数.系统常量"相区别,把php提供的东西叫语言 ...

  2. 【做题】51NOD1518 稳定多米诺覆盖——容斥&dp

    题意:求有多少种方案,用多米诺骨牌覆盖一个\(n\times m\)的棋盘,满足任意一对相邻行和列都至少有一个骨牌横跨.对\(10^9+7\)取模. \(n,m \leq 16\) 首先,这个问题的约 ...

  3. First Steps: Command-line

    This brief tutorial will teach how to get up and running with the Flyway Command-line tool. It will ...

  4. 比较好的MySQL索引原理

    MySQL索引原理及慢查询优化 - 美团技术团队 https://tech.meituan.com/2014/06/30/mysql-index.html

  5. Android Studio 快捷键、Debug的使用

    https://blog.csdn.net/q908555281/article/details/49331371 1.快捷键      个人习惯常用快捷键      在Eclipse中常用的快捷键 ...

  6. 题解——P1108低价购买(DP)

    第一问是最长下降子序列,n很小,n^2可过,注意最长下降子序列的枚举顺序即可 ;i<=n;i++)//不要写错 ;j<i;j++)//不要打成<= ) b[i]=b[j]+; 第二问 ...

  7. 【Hadoop 分布式部署 四:配置Hadoop 2.x 中主节点(NN和RM)到从节点的SSH无密码登录】

    *******************                一定要使这三台机器的用户名相同,安装目录相同          ************* SSH 无密钥登录的简单介绍(之前再搭 ...

  8. CentOS7使用httpd apache 和firewalld打开关闭防火墙与端口

    Centos7 使用systemctl 工具操作命令 systemctl 是Centos7的服务管理工具中的主要工具 ,它融合之前service和chkconfig的功能于一体 一.httpd的设置 ...

  9. hihoCoder 1116 计算(线段树)

    http://hihocoder.com/problemset/problem/1116 题意: 思路: 用线段树解决,每个节点需要设置4个变量,sum记录答案,all记录整个区间的乘积,pre记录该 ...

  10. linux golang

    wget -c http://www.golangtc.com/static/go/go1.3.linux-386.tar.gz #下载32位Linux的够源码包 tar -zxvf go1.1.li ...