安装 Reportlab(错误:命令“gcc”失败,退出状态为 1)
我正在尝试使用 virtualenv 在 10.04.2 服务器上安装 ReportLab 2.4。 在 ReportLab_2_4 文件夹中,我使用:
python setup.py install
以及我得到的错误:
错误:命令“gcc”失败,退出状态为 1
I'm trying to install ReportLab 2.4 on a 10.04.2 server with virtualenv.
In the ReportLab_2_4 folder I use:
python setup.py install
and the error I get:
error: command 'gcc' failed with exit status 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如 Skimantas 所说,我认为你应该安装 python-dev。
sudo apt-get install python-dev
并且我能够使用命令“pip install reportlab
”将reportlab安装到我的主目录中,而无需使用sudo,如前面提到的答案。我只需要 root 访问权限即可安装 python-dev。不久..
我安装了 virtualenv
我安装了
我激活我的虚拟环境只是为了确定......
就是这样。
(我只是记录了我在Ubuntu 10.04 LTS中所做的事情)
As Skimantas said, I think you should install python-dev.
sudo apt-get install python-dev
and I was able to install reportlab into my home directory with command "pip install reportlab
" without sudo as mentioned earlier answer. I need only root access to install python-dev.Shortly..
I installed virtualenv
I installed
I activate my virtual environment just to be sure...
And that's it.
(I just recorded what I did in Ubuntu 10.04 LTS)
我尝试在 Mac OS X 上安装 Reportlab 时遇到了非常类似的错误,我最近将其升级到 10.9。运行 Xcode,同意新的许可协议,然后重试。
I got a very similar error trying to install Reportlab on Mac OS X, which I'd recently upgraded to 10.9. Run Xcode, agree the the new license agreement, and try again.
在外部机会中,任何人都将reportlab部署到AWS EC2 / ElasticBeanstalk...我的解决方案如下。
这是超级 hacky,但它是一个解决方法,可以让它通过 AWS ElasticBeanstalk 在我的 django 堆栈上运行。我刚刚修改了 .ebextensions/02_python.config 来执行上述内容,然后再继续,我认为在使用 pip 将requirements.txt 安装到 venv 后,它被设置为执行第二个。
On the outside chance anyone is deploying reportlab to AWS EC2 / ElasticBeanstalk...My solution is below.
It's super hacky, but it's a workaround to get it running on my django stack with AWS ElasticBeanstalk. I just just modified .ebextensions/02_python.config to execute the above before continuing further, i think it is set to execute 2nd, after using pip to install requirements.txt to the venv.