python - make some modules from global site-packages available in virtualenv -


i want use default (no site packages) of virtualenv.

but modules difficult install in virtualenv (for example gtk). "difficult" mean need have lot of c-header files installed , lot of stuff needs compiled.

i know can solve not installing these packages pip, create symlinks make modules available global site-packages directory.

but right direction?

is there way create symlinks pip or virtualenv?

update

in 2013 wanted modules psycopg2, gtk, python-ldap , other installed on linux server via rpm/dpkg in virtualenv.

the symlinking or other work-arounds did make things more complicated, not simpler. use option today (2017)

--system-site-packages

give virtual environment access global site-packages.

i'd yeah, that's right direction.

your questions sounds similar dealt with: installing opencv virtualenv. problem opencv wasn't available via pip (python package index). ended doing querying system-wide global python installation module in question, , copy-ing .so virtualenv.

the whole process, including boilerplate makefile used, captured here: https://stackoverflow.com/a/19213369/1510289

you similar sym-linking instead of copying. reason ended copying library because use make, , make doesn't handle dependencies symbolic links in way needed (as explained in url above.)

hope helps...


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -