问题标签 [pythonbrew]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
174 浏览

pythonbrew - pythonbrew 不会在命令行上安装没有输出的python

我对 python、pythonbrew 和 ubuntu 都是新手。我需要 python 2.6,目前在我的 ubuntu 精确系统上有 2.7。在线搜索显示我不应该尝试卸载 2.7,因为这几乎会破坏操作系统,而是使用 pythonbrew 来管理多个 python 安装。

我尝试安装 pythonbrew,但 curl install ( curl -kL https://raw.githubusercontent.com/utahta/pythonbrew/master/pythonbrew-install | bash) 对我不起作用:它没有从 env 中获取我的 http 代理,然后没有将它传递给安装脚本,一旦我在命令行上提供了它。我手动下载了 pythonbrew 位,然后使用 python setup.py install 安装它。我以 root 身份执行它,它似乎可以工作(安装在 /root/.pythonbrew 下,这不是最好的),但是我不能将它用作系统上的其他用户(权限问题)。经过更多阅读后,我以 root 用户身份正确执行了脚本,并将 pythonbrew 安装到 /usr/local/pythonbrew (yay)。

现在,当我以 root 或非 root 用户身份执行以下操作时,它会等待一段时间,然后提示返回,没有错误或任何其他信息(--verbose 没有区别):

有任何想法吗?我猜这再次与代理有关,但我对 python 完全陌生,所以欢迎任何指针。

0 投票
1 回答
921 浏览

python - 如何将代理传递给 pythonbrew 以下载 setuptools?

我在 ubuntu 精确系统上安装了 pythonbrew。在安装过程中使用代理遇到了一些问题(请参阅之前的帖子)。现在我可以安装不同版本的 python 并在它们之间切换,但是在 python 安装过程中没有安装 setuptools:

build.log 包含:

在我看来,问题又出在代理上,我不确定要修改什么脚本,以便 setuptools 安装使用我的代理。我修改了distribute_setup.py 并在那里添加了代理信息(基于这篇文章),但看起来这个文件在每次调用pythonbrew install 时都会被覆盖。我是 python 新手,找不到这个文件是从哪里生成的。任何关于如何将代理传递给安装的 setuptools 部分的指针将不胜感激。

0 投票
1 回答
810 浏览

ansible - 使用 Ansible,如何在系统范围内安装 PythonBrew?

我正在尝试使用 Ansible (v 1.3.3) 创建一个剧本,以便按照Pythonbrew 自述文件中的说明在 Debian 服务器上安装 Pythonbrew 系统范围。

我能够安装 Pythonbrew,但我无法安装我想要的特定版本的 Python。我怀疑这个问题与运行 Ansible 的 shell 环境有关。

这是我的剧本脚本:

当我运行此剧本时,它失败并显示以下输出

失败:[devserver] => {“更改”:true,“cmd”:“pythonbrew install -v 2.7.3”,“delta”:“0:00:00.016639”,“end”:“2013-10-11 15:21:40.989677”,“rc”:127,“开始”:“2013-10-11 15:21:40.973038”}标准错误:/bin/bash:pythonbrew:找不到命令

在过去的一个小时左右,我一直在调整东西,但无济于事。有人对解决此问题有任何建议吗?

0 投票
2 回答
550 浏览

python - 使用 pythonbrew 安装 Django 时出错

我目前在尝试使用 pythonbrew 安装 Django 时遇到问题。

我的系统正在运行 ubuntu 12.04 (LTS),我正在按照以下说明运行 django:

http://www.tangowithdjango.com/book/chapters/requirements.html#installing-software

我完全按照本书的规定进行了所有操作,但是当需要在我的 pythonbrew 版本的 Python 上使用 Django 时,我收到了这个错误:

Traceback(最近一次调用最后一次):文件“”,第 1 行,在 ImportError:没有名为 django 的模块

所以我决定做一些调查,然后我进入了现在指定为我的 PYTHONPATH 的文件夹,用于添加其他库,即:

./.pythonbrew/pythons/Python-2.7.5/lib/python2.7/site-packages (我省略了上述 2 个文件夹级别,但我的 PYTHONPATH 是正确的,由 echo $PYTHONPATH 确认)

在 site-packages 文件夹中,没有任何内容,这解释了 Django 错误。

所以我关掉了pythonbrew,然后运行python,然后'import django',它工作了。

这可能意味着当尝试将东西安装到 Python 时,它可能由于某种原因(或者可能是其他原因)没有使用 PYTHONPATH。

我在这里看了看:

1)安装Django后出错(假设PATH或PYTHONPATH“错误”)(解决方案和问题似乎与我的非常不同,略有相似之处)

2)如何使用pythonbrew安装额外的python包(那个家伙没有得到回应并做了黑客攻击)

3)http://suvashthapaliya.com/blog/2012/01/sandboxed-python-virtual-environments/(这家伙建议在安装包之前使用virtualenv创建虚拟环境)

我不知道现在该做什么,我怀疑错误是我的 PYTHONPATH 或者有一些权限错误导致我所有安装的包都转到根 python 安装而不是 pythonbrew 包。

任何帮助将不胜感激(另外,这不是一个独特的问题,因为我希望许多其他人会遇到 pythonbrew 和 django 的安装问题)。

0 投票
1 回答
314 浏览

python - Pythonbrew 无法构建 python 2.6

正如 SublimeClang 的教程告诉我的那样,我尝试从 pythonbrew 安装 python。我已经执行了命令sudo ./pythonbrew install --configure="--enable-unicode=ucs4" 2.6(尝试使用和不使用 sudo)。它说要检查日志/build.log。我没有看到任何问题

0 投票
3 回答
209 浏览

python - 在 pythonbrew 中使用 virtualenv | 安装依赖项

从这个问题:

使用 pythonbrew 管理不同 virtualenv 中的 python 版本

我按照答案的说明输入:

完成此操作后,安装了 virtualenv,并在此处安装了这个新的 venv:

用户/.pythonbrew/venvs/Python-2.7.6/project1

我想知道的是如何使用 pip 在这个 virtualenv 中安装依赖项?

根据我目前的知识,我假设运行从通用终端点(user/)安装依赖项的命令将使依赖项安装在主 pythonbrew 安装中,而不是虚拟环境中。

我正在使用不同的 python 工具(但相同/最新的 python 2.7 版本)构建多个 Web 项目,所以我想将每个项目(及其不同的依赖项)分开。

0 投票
1 回答
221 浏览

python - Pythonbrew 无法安装 python 3.3?

我已经使用“pythonbrew install”安装了多个 python 版本。但是,对于 python 3.3,我收到消息:

我需要指定不同的子版本吗?请帮忙。

0 投票
3 回答
27792 浏览

python - 'bz2 is module not available' when installing Pandas with pip in python virtual environment

I am going through this post Numpy, Scipy, and Pandas - Oh My!, installing some python packages, but got stuck at the line for installing Pandas:

I changed 'wesm' to 'pydata' for the latest version, and the only other difference to the post is that I'm using pythonbrew.

I found this post, related to the error, but where is the Makefile for bz2 mentioned in the answer? Is there another way to resolve this problem?

Any help would be much appreciated. Thanks.

0 投票
1 回答
339 浏览

python - pythonbrew bashrc awk 行不再有效

我最近升级了我的 FreeBSD 盒子,现在 pythonbrew 似乎坏了。它退出了这一行的 .pythonbrew/etc/bashrc 文件:

给出错误:

PATH_ROOT 变量是

0 投票
0 回答
70 浏览

python - 我可以使用 pythonbrew 为我的虚拟环境指定目标位置吗?

当我这样做时:

一个新的虚拟环境安装到我的~/.pythonbrew/venvs/Python-2.7.3目录中,它也放置了我的所有其他虚拟环境。有没有办法在不破坏东西的情况下指定不同的目标位置(或在安装后将其移动到我想要的位置)?我想将我的虚拟环境与其关联的项目一起保存,而不是全部放在.pythonbrew目录下。我知道我可以用普通的旧 virtualenv 很容易地做到这一点,但我需要 pythonbrew 来使用我们想要的 python 的酿造版本。

我没有在文档中看到如何执行此操作,并且将我的虚拟环境复制到我的项目目录并从中进行符号链接并没有像我希望的那样工作。我知道 pyenv,并计划在某个时候走这条路,但目前仍在使用 pythonbrew。

有没有办法做到这一点,我错过了?