阿里云Ubuntu 16.04无法建立虚拟环境virtualenv,提示资源不存在-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

阿里云Ubuntu 16.04无法建立虚拟环境virtualenv,提示资源不存在

2018-03-05 12:22:12 4994 2

阿里云轻量应用服务器,Ubuntu 16.04系统,pip是最新版本,使用sudo apt install virtualenv成功安装了virtualenv。
当用virtualenv venv命令试图新建一个虚拟环境时,报如下错误。
我查看了常用的几个pypi镜像的均无simple/pkg-resources/路径,故可以排除是镜像连接的问题。
不知有何可能的原因?此问题在阿里云服务器上已出现多次提问列举如下,但均无有效的解决方案。

其它同样的问题有:
https://yq.aliyun.com/ask/56175?spm=a2c4e.11163080.searchask.26.2e802ec1iS4C4B
https://segmentfault.com/q/1010000008243346
http://blog.csdn.net/happycxz/article/details/77527301
https://s.amaprd.cc/yunqi/ask/56175

Log输出如下:
Running virtualenv with interpreter /usr/bin/python2

New python executable in /root/projects/Blog_mini/venv/bin/python2
Also creating executable in /root/projects/Blog_mini/venv/bin/python
Please make sure you remove any previous custom paths from your /root/.pydistutils.cfg file.
Installing setuptools, pkg_resources, pip, wheel...
  Complete output from command /root/projects/Blog_mini/venv/bin/python2 - setuptools pkg_resources pip wheel:
  Collecting setuptools
  Downloading http://mirrors.aliyun.com/pypi/packages/43/41/033a273f9a25cb63050a390ee8397acbc7eae2159195d85f06f17e7be45a/setuptools-38.5.1-py2.py3-none-any.whl (489kB)
Collecting pkg_resources
Exception:
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 512, in _prepare_file
    finder, self.upgrade, require_hashes)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_install.py", line 273, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 442, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 400, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 545, in _get_pages
    page = self._get_page(location)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 648, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/share/python-wheels/pip-8.1.1-py2.py3-none-any.whl/pip/index.py", line 760, in get_page
    resp.raise_for_status()
  File "/root/projects/Blog_mini/venv/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/models.py", line 840, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found for url: http://mirrors.aliyun.com/pypi/simple/pkg-resources/
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in <module>
    main()
  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 /root/projects/Blog_mini/venv/bin/python2 - setuptools pkg_resources pip wheel failed with error code 2
取消 提交回答
全部回答(2)
添加回答
相关问答

1

回答

求问下udf管理的问题,阿里云建议第三方依赖请采用Shade方式打包,请问这种方式避免不同团队开发的

2022-06-27 19:39:36 212浏览量 回答数 1

1

回答

公司部署在阿里云的官网无法打开(提示:不正确的项),远程重启虚拟机后,可以正常打开网页,每日都要重启

2019-02-19 11:12:35 434浏览量 回答数 1

2

回答

注销阿里云会员名 报错提示说有正在使用的云解析域名资源无法注销

2018-11-19 17:12:11 1158浏览量 回答数 2

2

回答

阿里云ECS Ubuntu sudo wget命令问题

2018-08-27 10:10:37 3270浏览量 回答数 2

2

回答

阿里云ECS ubuntu 16.04 samba 共享怎么在外网访问

2017-09-09 20:03:53 3306浏览量 回答数 2

3

回答

你好,我刚刚在阿里云完成了备案,我已经有了一个网站源码php mysql,请问下一步应该怎么做呢?

2017-04-25 22:17:44 2375浏览量 回答数 3

1

回答

阿里云容器Hub下载带git submodule的代码失败

2016-11-19 22:06:14 3626浏览量 回答数 1

2

回答

阿里云ubuntu上安装virtualbox

2016-04-12 12:15:27 8275浏览量 回答数 2

5

回答

qq邮箱发信给阿里云企业邮箱时提示邮箱地址不存在或格式错误!求解

2015-01-16 09:58:05 21053浏览量 回答数 5

11

回答

云存储PHP简易文件上传系统v1.3For阿里云存储【正式发布】

2012-12-15 21:14:40 15123浏览量 回答数 11
+关注
0
文章
1
问答
问答排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载