关于python环境搭建

pip install virtualenv

virtualenv venv

source venv/bin/activate

pip install xxx

error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

只需安装python-dev,它是Python的头文件和静态库包:

sudo apt-get install python-dev

ImportError: No module named mysql

pip install MySQL-python

pip install mysql-connector

Mac 安装pip命令:

sudo easy_install pip

Linux 安装pip命令:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

python get-pip.py

pip install pyCrypto

后台运行:

nohup python run.py >/dev/null 2>&1 &

nohup python phone7.py >phone7.log 2>&1 &

nohup python phone9.py >phone9.log 2>&1 &

你可能感兴趣的:(关于python环境搭建)