installing Reportlab (error: command 'gcc' failed with exit status 1 )

我只是一个虾纸丫 提交于 2019-12-04 23:42:10
Eino Mäkitalo

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

sudo apt-get install python-setuptools
sudo easy_install virtualenv
virtualenv --no-site-packages virtual01

I installed

sudo apt-get install python-dev

I activate my virtual environment just to be sure...

source  ~/virtual01/bin/activate

cd ~/virtual01/bin
pip install reportlab

And that's it.

(I just recorded what I did in Ubuntu 10.04 LTS)

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.

On the outside chance anyone is deploying reportlab to AWS EC2 / ElasticBeanstalk...My solution is below.

deactivate && sudo pip install reportlab
sudo cp -r /usr/local/lib64/python2.7/site-packages/reportlab /opt/python/run/venv/lib/python2.7/site-packages/

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!