Replies: 3 comments 3 replies
-
Intreseting idea that can create multiple problems. I did not hear about this before or heard about any project that would need that. After quick googling I found this: https://github.com/jsvine/envplus project is old and not maintained but you might want to try this out. Have you checked if Conda (Anaconda) or other environment managers maybe could help? If you are worried about "environment duplication" I'd like to discourage you from thinking about it. If you are running into problem with disk space on you machine you can try:
I think you either want to have isolated environments or you don't. |
Beta Was this translation helpful? Give feedback.
-
An option is to use the system-site packages for your projects. You would do something like this. poetry config virtualenvs.options.system-site-packages true
python3.9 -m pip install tensorflow
poetry env use python3.9 This will only work if the tensorflow versions across your projects are always the same. If you really want to go down the rabbit hole look at fiel system solutions like overlay etc. Or even get base containers built for your venvs and use solutions like toolbox. |
Beta Was this translation helpful? Give feedback.
-
I saw people have different thoughts, and maybe confusion of the request. Thinking this way, if I have two projects, both using python 3.9.5 and tensorflow 2.8.0. We usually have only one copy of the Python 3.9.5, either from pyenv, brew, system, condo or whatever installation method. Question is why we need to duplicate tensorflow 2.8.0? We do NOT need to the duplicate the tensorflow 2.8.0 for python 3.9.5, same as we don't need to duplicate the python 3.9.5. (I mentioned exact versions all the time to help think) Here is a python word example, https://pdm.fming.dev/configuration/. The PDM supports the catch in two ways. I think it's great if the poetry can do the similar thing. You can are argue all details on how to implement it to make a good isolation, but we can see that we don't need the duplications in some cases. |
Beta Was this translation helpful? Give feedback.
-
If I have multiple projects, using a same python version, and they all use some same libraries. Is there a way to not duplicate the libraries in each project?
For example, if I have five projects, all using python 3.9.5, tensorflow 2.8.0. What I'm trying to avoid is have five duplicate copies of tensorflow.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions