Building a Python (Conda) environment from requirements.txt in visual studio and linking environments to projects option #8000
Replies: 3 comments 1 reply
-
Transferring to a discussion item for up votes. |
Beta Was this translation helpful? Give feedback.
-
Did you mean here? I not sure I'm following. There's no requirements.txt allowed. Maybe you meant the environment.yml in the conda case. How do you 'rebuild' an environment? Just by creating a new one? Are you saying if you do so, the environment you get doesn't match what's in the environment.yml? That would likely be a problem in the environment.yml, not something that Visual Studio could change. It's conda that's running to generate the new environment. If the output conda environment doesn't match, it's probably because the exact versions were impossible or they weren't specified. |
Beta Was this translation helpful? Give feedback.
-
I also had a question about your idea for linking a virtual environment to a project. Did you want a new project to auto create a virtual environment (or maybe an option in the new project dialog) or did you want to have opening a specific project always create a specific virtual environment? Like maybe there's a requirements.txt in the project folder and if it's there VS would auto generate a venv for the user? |
Beta Was this translation helpful? Give feedback.
-
This issue has been moved from a ticket on Developer Community.
I would like to suggest an option for Visual Studio where the user can perform a "Full/Clean" rebuild of a Python (Conda) environment using the requirements.txt. I have experience where I rebuild a Python (Conda) environment using the requirements.txt file, but after the rebuild the generated requirements.txt file is different than that used in the rebuild. Sometimes the rebuilds do not seem to match the environment.txt that I see in Visual Studio (perhaps Visual Studio could ask the user to save the Requirements.txt file when selecting the option to rebuild using the Requirements.txt file. Please feel free to send a link that addresses the challenges of modifying the Python Environment.
I would also suggest that Visual Studio provide an option where the virtual environment is specifically linked to the project, i.e., an option where each new project will have its own virtual environment. This would be useful to users using shared computing resources. Thank you.
Original Comments
Feedback Bot on 9/2/2024, 00:37 AM:
Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. You will hear from us in about a week on our next steps.
Beta Was this translation helpful? Give feedback.
All reactions