创建新的 virtualenv 挂起

发布于 2024-09-18 04:14:43 字数 306 浏览 18 评论 0原文

我有一台 macbookpro。

我从 pylonsbook.com/virutalenv.py 下载了 virtualenv.py,

当我输入:

python virtualenv.py --no-site-packages env

它输出:

New python executable in env/bin/python

然后它就挂起,我在终端中没有收到提示。

我重新启动计算机并得到相同的结果,这是怎么回事?

I have a macbookpro.

I downloaded virtualenv.py from pylonsbook.com/virutalenv.py

when I type:

python virtualenv.py --no-site-packages env

it outputs:

New python executable in env/bin/python

then it just hangs, I don't get the prompt in terminal.

I've restarted the computer and I get the same result, what's wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

沉溺在你眼里的海 2024-09-25 04:14:43

我知道我正在回答一个古老的问题,但这是谷歌中出现的第一件事,我花了两个小时调试它。我的 virtualenv 创建在之后停止

New python executable in /home/blarg/foo/env/
Installing setuptools, pip, wheel...

,我通过删除 ~/.cached/pip/ 修复了它。希望有帮助。

I know I'm responding to an ancient question, but this is the first thing that came up in google and I spent two hours debugging it. My virtualenv creation was stalling after

New python executable in /home/blarg/foo/env/
Installing setuptools, pip, wheel...

And I fixed it by deleting ~/.cached/pip/. Hope that helps.

メ斷腸人バ 2024-09-25 04:14:43

您是否尝试过使用 easy_install virtualenv 来代替?获取最新版本绝不是一个坏主意。

(此外,该链接是我的 MacBook 上的 WFM。在出现提示后,它会将 setuptools 安装到虚拟环境中。)

Have you tried to easy_install virtualenv instead? Getting the most updated version is never a bad idea.

(Also, that link WFM on my MacBook. After that prompt it installs setuptools into the virtual environment.)

香橙ぽ 2024-09-25 04:14:43

没有太多可用信息,但从我从您提供的详细信息中收集到的信息来看,它在安装 setuptools 之前挂起。 setuptools 是通过从互联网获取来安装的。如果无法获取它,它可能会挂起。尝试将 setuptools 与 virtualenv.py 放在同一文件夹中,然后创建虚拟环境。这可能会解决问题。

There is not much information available but from what I can gather from the details that you have provided, it hangs just before installing setuptools. Setuptools is installed by fetching it from internet. It can hang, if it is not able to fetch it. Try keeping setuptools in the same folder as virtualenv.py and then create virtual env. This may solve the issue.

深海少女心 2024-09-25 04:14:43

我刚刚下载了您正在使用的版本,按照您所做的那样输入命令,然后它挂起:

 New python executable in env/bin/python

但只持续了三秒钟:

jeff@DeepThought:~/Downloads$ time python virtualenv.py --no-site-packages env
New python executable in env/bin/python
Installing setuptools...................done.

real       0m3.423s
user       0m0.260s
sys        0m0.030s

我从 http://pypi.python.org/pypi/virtualenv 根本没有挂起:

jeff@DeepThought:~/Downloads$ time virtualenv --no-site-packages ENV
New python executable in ENV/bin/python
Installing setuptools.............done.

real        0m0.525s
user        0m0.450s
sys         0m0.050s

我不确定你在放弃之前等了多久。我会尝试从 python.org 安装该版本,看看该版本是否更适合您。

I just downloaded the version you are using, put the command in exactly as you did and it hung after:

 New python executable in env/bin/python

But only for three seconds:

jeff@DeepThought:~/Downloads$ time python virtualenv.py --no-site-packages env
New python executable in env/bin/python
Installing setuptools...................done.

real       0m3.423s
user       0m0.260s
sys        0m0.030s

The installed the (easy_install) version I got from http://pypi.python.org/pypi/virtualenv did not hang at all:

jeff@DeepThought:~/Downloads$ time virtualenv --no-site-packages ENV
New python executable in ENV/bin/python
Installing setuptools.............done.

real        0m0.525s
user        0m0.450s
sys         0m0.050s

I'm not sure how long you waited before giving up. I would try installing the version from python.org to see if that one works better for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文