Install lxml in virtualenv for windows

I recently started using virtualenv and would like to install lxml in this sandbox.

I usually use Windows binary installer, but I want to use lxml in this virtualenv (not globally). Setting folders does not work for lxml, so I do not understand what I can do.

I read that creating symbolic links can work, although I am not familiar with how symbolic links work and for which files I should create them. Does anyone else know of any methods for installing lxml in virtualenv on Windows?

If creating symlinks is the only method that works, I definitely want to find out if anyone can point me in the right direction.

+6
source share
3 answers

The easiest way is to simply copy the library to the virtual -v-packages folder. Symlinking is a way to make it appear on the file system that the file is there, but physically in a different place. It would be really isolated if you copied the library.

So, go to your global site packages folder and copy both the lxml folder and the lxml egg folder to your virtualenv site packages. If you really wanted symlink (for NTFS), take a look here .

+4
source
+8
source

Just wanted to add that emeraldo.cs answer is correct, but you also need to copy the lxml-related files that exist in the root of the package site. Once all the files have been copied, pip will think that it is installed.

0
source

Source: https://habr.com/ru/post/919469/


All Articles