使用ubuntu virtualenv。我试图安装reportlab
命令是
pip install reportlab
在这个目录中
(company2)stefano@stefano-X550EP:~/htdocs/company2$
错误是
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
实际上,pip列表是:
argparse (1.2.1)
Django (1.7.7)
html5lib (0.999)
pip (1.5.4)
pisa (3.0.33)
PyPDF2 (1.24)
setuptools (2.2)
wsgiref (0.1.2)
xhtml2pdf (0.0.6)
我需要reportlab来使用xhtml2pdf,因为现在django项目给了我这个错误:
No module named reportlab.lib.colors
如果没有完整的错误日志,就无法判断。但我打赌你一定是错过了python-dev
尝试安装它:
然后pip再次安装reportlab。
希望能有所帮助。
见:installing Reportlab (error: command 'gcc' failed with exit status 1 )
sudo apt get install python dev几乎是正确的。但如果您使用的是python3.x,则需要更改它来安装python3-dev,这使我的django、postgresql和venv设置有了很大的不同。
在安装可读性lxml和python包时,我也遇到了同样的问题。然后我试着安装下面的软件包,它对我有效。
相关问题 更多 >
编程相关推荐