I have virtualenv with --no-site-packages
option. I'm using scrapy in it. Scrapy uses libxml2 by import libxml2
. How to install libxml2 in virtualenv using pip
or easy_install
?
You can use an existing directory which is already in the path, such as C:\WINDOWS . You can also create a new directory for libxml and place the files there, but be sure to modify the PATH environment variable and add that new directory to its list.
To install lxml in Visual Studio Code:Press CTRL + ` (Backtick) on your keyboard to open the terminal. Run the pip install lxml command to install the lxml module.
pip install ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz
libxml2 is a C library not a python package so you cannot use Pip to install it. Normally it is already installed on almost every Linux distro out there. If you need to install it it's just
sudo apt-get install libxml2
If for some reason you absolutely need to have a local install you will need to grab and install the .deb package or the RPM. Barring that you can download the source and build it.
If you are fine with using the common copy but don't want to have /usr/local/ in your path, then just symlink it within your virtualenv.
You can find more info (than you probably wanted) at http://xmlsoft.org/
Scrapy lists it in their requirements:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With