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//安装一个软件测试

  • 相关阅读:
    Unity3d限制帧数
    Linux 后台运行程序
    Flask异步发送邮件的方法
    [转]视图多表
    dede 织梦手机静态化一键生成插件
    如何在wordpress中设置关键词和描述
    前端PS切图
    帝国cms用自定义列表页做首页
    帝国cms 滚动加载更多整合
    swiper 自定义pagination 样式内容
  • 原文地址:https://www.cnblogs.com/Kinge/p/10213377.html
Copyright © 2011-2022 走看看