1.linux安装3.x
yum -y install wget gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tar.xz xz -d Python-3.7.6.tar.xz tar -xvf Python-3.7.6.tar cd Python-3.7.6 ./configure --prefix=/usr/local/python37 --enable-optimizations make && make install
2.添加环境变量
cd ~ vim .bash_profile export PATH=$PATH:/usr/local/python37/bin source .bash_profile
windows 请参考 python从零到pytorch【零】安装miniocnda
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com