简体   繁体   中英

How to get specific global package (module) of python in venv?

I had installed TensorFlow of 586 MB in my ubuntu now if I create any venv environment I have to redownload it in the venv. is there any way by that I can get the TensorFlow from global to my venv without downloading or having extra modules.

Normally pip wouldn't need to download tensorflow again, as it keeps copies of downloaded artifacts in a local cache on the file system. But it would need to install it in each virtual environment , unless...

Maybe venv 's --system-site-packages option is what you are looking for:

https://docs.python.org/3/library/venv.html?highlight=system%20site%20packages#creating-virtual-environments

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