简体   繁体   中英

Python: pip install lxml from source using pip and cython

I'm running a virtual environment on ubuntu and would like to install lxml from source with cython for better performance using lxml.

Normally install lxml using cython from source is straightforward

python setup.py build --with-cython

To install via PIP from source you would run

pip install -e setup.py

How do you combine the two? This is an issue because I can't get lxml installed this way into my virtualenv and will loose the performance boost by installing via a traditional pip install lxml.

假设您使用的是最新版本的pip (当前为7.0.3,请使用[sudo] pip install -U pip升级),则应该可以使用--global-option <options>标志将参数传递给setup.py然后运行install命令。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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