以前虚拟环境一下子就装好了, 今天多次尝试,发现错误信息总是如下

D:\vir_env\supetset>virtualenv env
Using base prefix 'c:\\python36'
New python executable in D:\vir_env\supetset\env\Scripts\python3.exe
Also creating executable in D:\vir_env\supetset\env\Scripts\python.exe
Installing setuptools, pip, wheel...Complete output from command D:\vir_env\supetset\env\Scripts\python3.exe - set
uptools pip wheel:Looking in links: c:\python36\lib\site-packages\virtualenv_support
Collecting setuptoolsDownloading https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec6
8e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whl (582
kB)
Exception:
Traceback (most recent call last):File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_vendor\urllib3\response.py", line 360, in _error_catcheryieldFile "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_vendor\urllib3\response.py", line 442, in readdata = self._fp.read(amt)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_vendor\cachecontrol\filewrapper.py", line 62, in readdata = self.__fp.read(amt)File "c:\python36\Lib\http\client.py", line 449, in readn = self.readinto(b)File "c:\python36\Lib\http\client.py", line 493, in readinton = self.fp.readinto(b)File "c:\python36\Lib\socket.py", line 586, in readintoreturn self._sock.recv_into(b)File "c:\python36\Lib\ssl.py", line 1009, in recv_intoreturn self.read(nbytes, buffer)File "c:\python36\Lib\ssl.py", line 871, in readreturn self._sslobj.read(len, buffer)File "c:\python36\Lib\ssl.py", line 631, in readv = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed outDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\cli\base_command.py", line 179, in mainstatus = self.run(options, args)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\commands\install.py", line 315, in runresolver.resolve(requirement_set)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\resolve.py", line 131, in resolveself._resolve_one(requirement_set, req)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\resolve.py", line 294, in _resolve_oneabstract_dist = self._get_abstract_dist_for(req_to_install)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\resolve.py", line 242, in _get_abstract_dist_forself.require_hashesFile "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\operations\prepare.py", line 334, in prepare_linked_requi
rementprogress_bar=self.progress_barFile "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\download.py", line 878, in unpack_urlprogress_bar=progress_barFile "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\download.py", line 702, in unpack_http_urlprogress_bar)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\download.py", line 946, in _download_http_url_download_url(resp, link, content_file, hashes, progress_bar)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\download.py", line 639, in _download_urlhashes.check_against_chunks(downloaded_chunks)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\utils\hashes.py", line 62, in check_against_chunksfor chunk in chunks:File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\download.py", line 607, in written_chunksfor chunk in chunks:File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\utils\ui.py", line 159, in iterfor x in it:File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_internal\download.py", line 596, in resp_readdecode_content=False):File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_vendor\urllib3\response.py", line 494, in streamdata = self.read(amt=amt, decode_content=decode_content)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_vendor\urllib3\response.py", line 459, in readraise IncompleteRead(self._fp_bytes_read, self.length_remaining)File "c:\python36\Lib\contextlib.py", line 99, in __exit__self.gen.throw(type, value, traceback)File "c:\python36\lib\site-packages\virtualenv_support\pip-19.0.3-py2.py3-none
-any.whl\pip\_vendor\urllib3\response.py", line 365, in _error_catcherraise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files
.pythonhosted.org', port=443): Read timed out.
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):File "c:\python36\lib\runpy.py", line 193, in _run_module_as_main"__main__", mod_spec)File "c:\python36\lib\runpy.py", line 85, in _run_codeexec(code, run_globals)File "C:\Python36\Scripts\virtualenv.exe\__main__.py", line 9, in <module>File "c:\python36\lib\site-packages\virtualenv.py", line 793, in mainsymlink=options.symlink,File "c:\python36\lib\site-packages\virtualenv.py", line 1088, in create_envir
onmentinstall_wheel(to_install, py_executable, search_dirs, download=download)File "c:\python36\lib\site-packages\virtualenv.py", line 935, in install_wheel_install_wheel_with_search_dir(download, project_names, py_executable, searc
h_dirs)File "c:\python36\lib\site-packages\virtualenv.py", line 1025, in _install_whe
el_with_search_dircall_subprocess(cmd, show_stdout=False, extra_env=env, stdin=script)File "c:\python36\lib\site-packages\virtualenv.py", line 886, in call_subproce
ssraise OSError("Command {} failed with error code {}".format(cmd_desc, proc.r
eturncode))
OSError: Command D:\vir_env\supetset\env\Scripts\python3.exe - setuptools pip wh
eel failed with error code 2D:\vir_env\supetset>

总结错误信息内容,是在
Downloading https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec6
8e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whl (582
kB)
Exception:

之时报的错,表达的意思大致是模块下载太慢导致的网络问题,试了很多次仍然无法创建虚拟环境。
网上有的博客说可能是中文路径、pip需要升级、python安装路径中有空格等,都没能解决问题。

最后使用 virtualenv myenv --no-setuptools 成功创建虚拟环境,创建虚拟环境后又在虚拟环境下使用 pip install setuptools命令给虚拟环境装上setuptools.


D:\vir_env\supetset>virtualenv env --no-setuptools
Using base prefix 'c:\\python36'
New python executable in D:\vir_env\supetset\env\Scripts\python3.exe
Also creating executable in D:\vir_env\supetset\env\Scripts\python.exe
Installing pip, wheel...
done.

可是下载模块的时候明明是pip下载失败,我不安装setuptools反而创建虚拟环境成功,并且立马再创建其他的虚拟环境也能成功,这其中究竟是什么原理就不清楚了。

参考:https://www.cnblogs.com/hufulinblog/p/9824579.html

从上午一直倒腾到下午,郁闷…
2020-04-29 14.15写

下午继续采坑:

D:\vir_env\supetset>env\Scripts\activate(env) D:\vir_env\supetset>pip3 install sasl-0.2.1-cp36-cp36m-win_amd64.whl
WARNING: Requirement 'sasl-0.2.1-cp36-cp36m-win_amd64.whl' looks like a filename
, but the file does not exist
Processing d:\vir_env\supetset\sasl-0.2.1-cp36-cp36m-win_amd64.whl
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such
file or directory: 'D:\\vir_env\\supetset\\sasl-0.2.1-cp36-cp36m-win_amd64.whl'(env) D:\vir_env\supetset>cd D:\用户目录\下载(env) D:\用户目录\下载>pip3 install sasl-0.2.1-cp36-cp36m-win_amd64.whl
Processing d:\用户目录\下载\sasl-0.2.1-cp36-cp36m-win_amd64.whl
Collecting sixUsing cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six, sasl
Successfully installed sasl-0.2.1 six-1.14.0(env) D:\用户目录\下载>cd D:\vir_env\supetset(env) D:\vir_env\supetset>pip3 install superset
Collecting supersetDownloading superset-0.30.1.tar.gz (42.0 MB)|                                | 30 kB 1.8 kB/s eta 6:24:17ERROR: Excepti
on:
Traceback (most recent call last):File "d:\vir_env\supetset\env\lib\site-packages\pip\_vendor\urllib3\response.p
y", line 425, in _error_catcher(env) D:\vir_env\supetset>pip3 install sasl-0.2.1-cp36-cp36m-win_amd64.whl
WARNING: Requirement 'sasl-0.2.1-cp36-cp36m-win_amd64.whl' looks like a filename
, but the file does not exist
Processing d:\vir_env\supetset\sasl-0.2.1-cp36-cp36m-win_amd64.whl
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such
file or directory: 'D:\\vir_env\\supetset\\sasl-0.2.1-cp36-cp36m-win_amd64.whl'(env) D:\vir_env\supetset>cd D:\用户目录\下载(env) D:\用户目录\下载>pip3 install sasl-0.2.1-cp36-cp36m-win_amd64.whl
Processing d:\用户目录\下载\sasl-0.2.1-cp36-cp36m-win_amd64.whl
Collecting sixUsing cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six, sasl
Successfully installed sasl-0.2.1 six-1.14.0----
(env) D:\用户目录\下载>pip3 install superset-0.30.1.tar.gz
Processing d:\用户目录\下载\superset-0.30.1.tar.gzERROR: Command errored out with exit status 1:command: 'd:\vir_env\supetset\env\scripts\python3.exe' -c 'import sys, setu
ptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\
pip-req-build-0gvu9mc9\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppDat
a\\Local\\Temp\\pip-req-build-0gvu9mc9\\setup.py'"'"';f=getattr(tokenize, '"'"'o
pen'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.
close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\U
sers\ADMINI~1\AppData\Local\Temp\pip-pip-egg-info-cvp7wvd5'cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-req-build-0gvu9mc9\Complete output (3 lines):Traceback (most recent call last):File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'setuptools'----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.---
(env) D:\用户目录\下载>pip3 install setuptools-46.1.3-py3-none-any.whl
Processing d:\用户目录\下载\setuptools-46.1.3-py3-none-any.whl
Installing collected packages: setuptools
Successfully installed setuptools-46.1.3(env) D:\用户目录\下载>pip3 install superset-0.30.1.tar.gz
Processing d:\用户目录\下载\superset-0.30.1.tar.gz
Building wheels for collected packages: supersetBuilding wheel for superset (setup.py) ... doneCreated wheel for superset: filename=superset-0.30.1-py3-none-any.whl size=426
53772 sha256=82a449d1bc9871f631ae54727e286c5d87d1dfee5adfaa076ccaafce6876a94eStored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\b2\
4e\07\6208a326951cc2b83ce0a3bcbd0b0778bf2b74962938e4eb88
Successfully built superset
Installing collected packages: superset
Successfully installed superset-0.30.1


终于看到successfully 了 ,真心不易呀

此刻 :2020-04-29 16.23

参考:https://blog.csdn.net/folecld123/article/details/80705616
https://www.jianshu.com/p/b02fcea7eb5b
https://www.cnblogs.com/luweilehei/p/10644399.html#4564126

python 创建虚拟环境时报错OSError, setuptools下载失败相关推荐

  1. python创建虚拟环境报错typeerror_python 创建虚拟环境时报错OSError, setuptools下载失败...

    错误信息如下: Using base prefix 'c:\\users\\huful\\appdata\\local\\programs\\python\\python36-32' New pyth ...

  2. python虚拟环境创建失败_python 创建虚拟环境时报错OSError, setuptools下载失败

    错误信息如下: Using base prefix 'c:\\users\\huful\\appdata\\local\\programs\\python\\python36-32' New pyth ...

  3. python创建虚拟环境报错_python 创建虚拟环境时报错OSError, setuptools下载失败

    错误信息如下: Using base prefix 'c:\\users\\huful\\appdata\\local\\programs\\python\\python36-32' New pyth ...

  4. python创建虚拟环境报错typeerror_解决Python中报错TypeError: must be str, not bytes问题

    如下所示: #!/usr/bin/python import pickle shoplist=['apple','mango','carrot'] f = open('c:\poem.txt','w' ...

  5. python 创建虚拟环境报错

    错误代码 C:\Users\Administrator>mkvirtualenv -p D:\python3.6.6\python.exe weibo Running virtualenv wi ...

  6. conda创建虚拟环境时报错:InvalidArchiveError(“Error with archive C:\\Users\\..\\.conda\\pkgs\\wheel-0.38.4....

    问题如上图所示. 这个问题好多博主说要将anaconda的文件进行权限的调整,还有说把上图所示路径的"pkgs"文件夹删掉.我都试过啦!没用! 我后来又看到网上有说anaconda ...

  7. Anaconda创建虚拟环境时报错 InvalidArchiveError Error with archive D:\\(anaconda的路径)\\pkgs\\vs2015_runtime

    解决方法:使用管理员身份运行Anaconda prompt. 1.右击anaconda prompt 2.选择"以管理员身份运行" 3.正常输入命令就可以了

  8. doesnt exist table_Mysql创建表时报错Table doesn't exist解决办法

    最近做项目时,本地数据库出了毛病,PHPMyadmin中有几张表不见了,我想应该是误删了吧,于是准备重新建一张表,可是问题出现了,sql报错,说表不存在... 什么鬼!就是因为表不存在我才要创建的好吗 ...

  9. mysql 创建库 5.7_MySQL数据库之MySQL5.7创建用户时报错

    本文主要向大家介绍了MySQL数据库之MySQL5.7创建用户时报错 ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助. 1 故障现象: 在创建用户时候,提示以下错误: root@l ...

最新文章

  1. SQL SERVER 分区表的总结--一些疑问的总结
  2. Anaconda 默认环境
  3. fedora linux操作系统安装,Fedora-10 Linux操作系统的安装,Fedora Linux的安装锦集收藏,图文并茂详解...
  4. Binary String Minimizing CodeForces - 1256D(贪心)
  5. 获江苏国资阿里小米等入股 苏宁易购复牌涨停
  6. [Effective JavaScript 笔记]第61条:不要阻塞I/O事件队列
  7. Python Appium 元素定位方法简单介绍
  8. 在ASP.NET MVC中使用Knockout实践07,自定义验证信息的位置与内容
  9. mysql的增量备份方法_mySQL 增量备份方案(转)
  10. 小米Android OS特别高,干翻小米,最强定制安卓系统诞生?Color OS11表现如何
  11. Java Web的Excel读取
  12. 利用pdfminer3k 使用python语言提取PDF中的文本
  13. 【摄像头】图像传感器尺寸、像素大小和成像质量的关系
  14. window7系统下如何使用虚拟机安装苹果系统
  15. [转载]班主任带着学生打副本 每周学习成绩就是DKP(这篇太雷人了,转载保持)...
  16. Gradle剔除依赖
  17. 胜负无定数,敢搏成七分
  18. 第二届Techo TVP 开发者峰会有感
  19. 【软件测试】如何测试人工智能软件?
  20. 研究生规划及论文写作

热门文章

  1. lol韩服游戏内设置_lol韩服设置中文对照
  2. 淘宝/天猫、1688、京东API接口—item_search - 按关键字搜索淘宝商品
  3. python报错:source code string cannot contain null bytes
  4. 服务器、网络、存储设备术语
  5. 彩虹显IP 后两位星号 解决方案 全显IP
  6. zippo油和zorro油的区别_自行车油压碟刹和拉线式碟刹的区别?
  7. 格式工厂压缩视频教程
  8. 压缩视频最好最快的软件?mp4视频太大怎么压缩格式工厂?
  9. 10款常见的Webshell检测工具
  10. Vim_设置Esc快捷键及补全功能: