多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ### Linux/MacOs下安装 **** Dockerfile ``` FROM centos:7 RUN yum -y install zlib-devel \ bzip2-devel \ ncurses-devel \ sqlite-devel \ readline-devel \ tk-devel \ gdbm-devel \ db4-devel \ libpcap-devel \ xz-devel \ libffi-devel \ openssh-server \ perl-DB_File.x86_64 RUN yum install -y wget \ net-tools \ gcc \ gcc-c++ \ make \ cmake WORKDIR /data/ RUN wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz \ && tar -zxvf openssl-1.1.1a.tar.gz \ && cd openssl-1.1.1a \ && ./config --prefix=/usr/local/openssl no-zlib \ && ln -s /usr/local/openssl/include/openssl /usr/include/openssl \ && ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/local/lib64/libssl.so \ && ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl \ && echo "/usr/local/openssl/lib" >> /etc/ld.so.conf \ && ldconfig -v WORKDIR /data/ RUN wget http://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz \ && tar -xvf Python-3.7.1.tar.xz && cd Python-3.7.1/ \ && ./configure --prefix=/usr/local/python37 --with-openssl=/usr/local/openssl --enable-optimizations\ && make && make install RUN mv /usr/bin/python /usr/bin/python_bak \ && ln -s /usr/local/python37/bin/python3.7 /usr/bin/python && ln -s /usr/local/python37/bin/pip3.7 /usr/bin/pip WORKDIR /data/ ``` 执行命令: ``` $ docker build -t python3.7:v0 . ``` ### Windows下安装 **** 因为我的电脑中以前装有python,这次重新从网上安装python3后与之前残留的设置产生了冲突,打开cmd输入python出现错误: ``` Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings'  原因是以前的环境变量在系统中有残留导致系统无法识别新安装的python。 ``` 解决方法: 打开环境变量,在系统变量中的Path中加入两条环境变量: ``` C:\Python37-32\Scripts\   C:\Python37-32\ ``` 确保PYTHONHOME是C:\Python37-32 保存设置