zoukankan      html  css  js  c++  java
  • CentOS6.5部署python3.5.6环境

    ./configure --prefix=/opt/python3.5.6 --with-ssl

    ln -s /opt/python3.5.6/bin/python3.5 /usr/bin/python3
    ln -s /opt/python3.5.6/bin/pip3.5 /usr/bin/pip3

    ln -s /app/python3/bin/python3.7 /usr/bin/python3
    ln -s /app/python3/bin/pip3.7 /usr/bin/pip3

    configure: error: no acceptable C compiler found in $PATH
    The necessary bits to build these optional modules were not found:
    _ssl _uuid
    To find the necessary bits, look in setup.py in detect_modules() for the module's name.
    The following modules found by detect_modules() in setup.py, have been
    built by the Makefile instead, as configured by the Setup files:
    _abc atexit pwd
    time
    Could not build the ssl module!
    [monitor@Python Python-3.7.0]$ ./configure --prefix=/opt/python3 --with-openssl=/usr/bin --with-ssl-default-suites=openssl
    ln -s /opt/python3/bin/python3.6 /usr/bin/python3
    ln -s /opt/python3/bin/pip3.6 /usr/bin/pip3
    --with-openssl=DIR root of the OpenSSL directory
    --with-ssl-default-suites=[python|openssl|STRING]

    pip3 download -r requirement.txt -d offline_package

    1.制作requirement.txt
    pip freeze > requirement.txt
    2.下载离线Pytho安装包
    pip download -r requirement.txt -d offline_package
    3.安装离线安装包
    pip install --no-index --find-links=./offline_package -r requirement.txt

    本地yum源

    [root@linuxidc 桌面]# mkdir /media/cdrom//新建一个挂载点
    [root@linuxidc 桌面]# mount /dev/cdrom /media/cdrom//挂载镜像到挂载点
    [root@linuxidc 桌面]# cd /etc/yum.repos.d//进入yum源配置目录
    [root@linuxidc 桌面]# ls//查看当前目录中的文件
    [root@linuxidc 桌面]# mkdir bak
    [root@linuxidc 桌面]# mv * bak
    [root@linuxidc 桌面]# cd bak/
    [root@linuxidc 桌面]# cp CentOS-Media.repo ..
    [root@linuxidc 桌面]# cd ..//备份原配置文件
    [root@linuxidc 桌面]# gedit CentOS-Media.repo 将enabled=0改为1//开启本地源
    [root@linuxidc 桌面]# yum clean all//清空yum缓存
    [root@linuxidc 桌面]# yum makecache//制作新的缓存
    [root@linuxidc 桌面]# yum install wireshark -y//安装一个软件测试

  • 相关阅读:
    Java多线程之Exchanger
    Java8 比AtomicLong更加高效的原子操作LogAdder
    synchronized父子类对象锁重入
    java8 stream多字段排序
    利用java代码给mongo数据库加索引、删除索引等操作
    C++之IO
    C++之类的定义和性质
    C++之动态内存与类型转换
    C++之字符与其他数据类型
    C++之函数与模板
  • 原文地址:https://www.cnblogs.com/Kinge/p/10213377.html
Copyright © 2011-2022 走看看