简体   繁体   English

在安装lxml时出现问题

[英]Issue installing lxml

When I tried to install lxml using 当我尝试使用安装lxml时

pip install --upgrade lxml

..I am getting following error ..我收到以下错误

/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-    
linux/4.7.2/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation     
R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making   
a shared object; recompile with -fPIC

How to resolve this? 如何解决呢?

I could able to resolve it with solution here 我可以在这里用解决方案解决

How to ignore local python when building python from source 从源代码构建python时如何忽略本地python

Python 2.7.6: 
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared               LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM