1、安装pyenv
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
2、设置环境变量
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo -e 'if command -v pyenv 1>/dev/null 2>&
分类标签归档:python
1、安装pyenv
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
2、设置环境变量
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo -e 'if command -v pyenv 1>/dev/null 2>&
#user_agent 集合
user_agent_list = [
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/45.0.2454.85 Safari/537.36 115Browser/6.0.3',
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1
import re
import os
import time
import threading
from multiprocessing import Pool, cpu_count
import requests
from bs4 import BeautifulSoup
HEADERS = {
'X-Requested-With': 'XMLHttpRequest',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36
我是小菜鸟一个,用的是eclipse系统中的Python写的系统,但要用jieba库,我用的是全自动安装的:pip install jieba,也就是说打开cmd直接输入pip install jieba就可以了,但是可能会提示我们:You should consider upgrading via the 'pip install --upgrade pip' command.也就是说会出现下边的这种情况:
那么该怎么解决呢,我是问了问其他人,他们说用国内镜像的就行,我就用的国内镜像的,即打开cmd,输入:pip install -i https://pypi.tuna.tsinghua.e