OSError: Command /home/liang/.spider/mygerapy/bin/python3 - setuptools pkg_resources pip wheel fa...

昨天裝虛擬環(huán)境一直報(bào)錯(cuò)

(autohome_spider) liang@liang-virtual-machine:~/.spider$ mkvirtualenv -p /usr/bin/python3 mygerapyAlready using interpreter /usr/bin/python3Using base prefix '/usr'New python executable in /home/liang/.spider/mygerapy/bin/python3Not overwriting existing python script /home/liang/.spider/mygerapy/bin/python (you must use /home/liang/.spider/mygerapy/bin/python3)Installing setuptools, pkg_resources, pip, wheel... Complete output from command /home/liang/.spider/mygerapy/bin/python3 - setuptools pkg_resources pip wheel: Collecting setuptoolsException:Traceback (most recent call last): File "/home/liang/.spider/mygerapy/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 377, in _make_request httplib_response = conn.getresponse(buffering=True)TypeError: getresponse() got an unexpected keyword argument 'buffering'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/home/liang/.spider/mygerapy/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 560, in urlopen body=body, headers=headers) File "/home/liang/.spider/mygerapy/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 379, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse response.begin() File "/usr/lib/python3.5/http/client.py", line 297, in begin version, status, reason = self._read_status() File "/usr/lib/python3.5/http/client.py", line 266, in _read_status raise RemoteDisconnected("Remote end closed connection without"http.client.RemoteDisconnected: Remote end closed connection without responseDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/basecommand.py", line 209, in main status = self.run(options, args) File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/commands/install.py", line 328, in run wb.build(autobuilding=True) File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/wheel.py", line 748, in build self.requirement_set.prepare_files(self.finder) File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_set.py", line 360, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_set.py", line 577, in _prepare_file session=self.session, hashes=hashes) File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/download.py", line 810, in unpack_url hashes=hashes File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/download.py", line 649, in unpack_http_url hashes) File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/download.py", line 842, in _download_http_url stream=True, File "/home/liang/.spider/mygerapy/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get return self.request('GET', url, **kwargs) File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/download.py", line 378, in request return super(PipSession, self).request(method, url, *args, **kwargs) File "/home/liang/.spider/mygerapy/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "/home/liang/.spider/mygerapy/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "/home/liang/.spider/mygerapy/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send timeout=timeout File "/home/liang/.spider/mygerapy/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen _stacktrace=sys.exc_info()[2]) File "/home/liang/.spider/mygerapy/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment total -= 1TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'----------------------------------------...Installing setuptools, pkg_resources, pip, wheel...done.Traceback (most recent call last): File "/usr/bin/virtualenv", line 9, in load_entry_point('virtualenv==15.0.1', 'console_scripts', 'virtualenv')()

? File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main

? ? symlink=options.symlink)

? File "/usr/lib/python3/dist-packages/virtualenv.py", line 988, in create_environment

? ? download=download,

? File "/usr/lib/python3/dist-packages/virtualenv.py", line 918, in install_wheel

? ? call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)

? File "/usr/lib/python3/dist-packages/virtualenv.py", line 812, in call_subprocess

? ? % (cmd_desc, proc.returncode))

OSError: Command /home/liang/.spider/mygerapy/bin/python3 - setuptools pkg_resources pip wheel failed with error code 2


各種查找解決方案,最終也沒解決。晚上就想之前操作過什么東西,就想起改過pip源走触,設(shè)成了永久的

pip源的改法 ?http://www.reibang.com/p/3621780417be

今天早上把原先建的pip.conf文件刪了存崖,再去裝虛擬環(huán)境身诺,OK了硼补。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市涣雕,隨后出現(xiàn)的幾起案子艰亮,更是在濱河造成了極大的恐慌,老刑警劉巖挣郭,帶你破解...
    沈念sama閱讀 223,002評(píng)論 6 519
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件迄埃,死亡現(xiàn)場離奇詭異,居然都是意外死亡兑障,警方通過查閱死者的電腦和手機(jī)侄非,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,357評(píng)論 3 400
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來旺垒,“玉大人彩库,你說我怎么就攤上這事∠冉” “怎么了骇钦?”我有些...
    開封第一講書人閱讀 169,787評(píng)論 0 365
  • 文/不壞的土叔 我叫張陵,是天一觀的道長竞漾。 經(jīng)常有香客問我眯搭,道長,這世上最難降的妖魔是什么业岁? 我笑而不...
    開封第一講書人閱讀 60,237評(píng)論 1 300
  • 正文 為了忘掉前任鳞仙,我火速辦了婚禮,結(jié)果婚禮上笔时,老公的妹妹穿的比我還像新娘棍好。我一直安慰自己,他們只是感情好允耿,可當(dāng)我...
    茶點(diǎn)故事閱讀 69,237評(píng)論 6 398
  • 文/花漫 我一把揭開白布借笙。 她就那樣靜靜地躺著,像睡著了一般较锡。 火紅的嫁衣襯著肌膚如雪业稼。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,821評(píng)論 1 314
  • 那天蚂蕴,我揣著相機(jī)與錄音低散,去河邊找鬼。 笑死骡楼,一個(gè)胖子當(dāng)著我的面吹牛熔号,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播鸟整,決...
    沈念sama閱讀 41,236評(píng)論 3 424
  • 文/蒼蘭香墨 我猛地睜開眼跨嘉,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起祠乃,我...
    開封第一講書人閱讀 40,196評(píng)論 0 277
  • 序言:老撾萬榮一對(duì)情侶失蹤梦重,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后亮瓷,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體琴拧,經(jīng)...
    沈念sama閱讀 46,716評(píng)論 1 320
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,794評(píng)論 3 343
  • 正文 我和宋清朗相戀三年嘱支,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了蚓胸。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,928評(píng)論 1 353
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡除师,死狀恐怖沛膳,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情汛聚,我是刑警寧澤锹安,帶...
    沈念sama閱讀 36,583評(píng)論 5 351
  • 正文 年R本政府宣布,位于F島的核電站倚舀,受9級(jí)特大地震影響叹哭,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜痕貌,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 42,264評(píng)論 3 336
  • 文/蒙蒙 一风罩、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧舵稠,春花似錦超升、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,755評(píng)論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至唉工,卻和暖如春研乒,著一層夾襖步出監(jiān)牢的瞬間汹忠,已是汗流浹背淋硝。 一陣腳步聲響...
    開封第一講書人閱讀 33,869評(píng)論 1 274
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留宽菜,地道東北人谣膳。 一個(gè)月前我還...
    沈念sama閱讀 49,378評(píng)論 3 379
  • 正文 我出身青樓,卻偏偏與公主長得像铅乡,于是被迫代替她去往敵國和親继谚。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,937評(píng)論 2 361

推薦閱讀更多精彩內(nèi)容