Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 5

Best practice for communicating dependencies (in python)

Solved! Go to Solution.

Hi everybody,

 

I am about to start a project in python which uses a couple dependecies and I was wondering if there is best practice when it comes to communicating and handling these dependencies. Are they in general just written down in a file or is the best approach to write a script that sets up the needed environment and the dependencies?

 

Thank you for your help

4 Replies
Highlighted
Commander Lvl 2
Message 2 of 5

Re: Best practice for communicating dependencies (in python)

A couple of possibilities: Create a requirements.txt file, or use pipenv to manage a virtual environment.

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Highlighted
Solution
Commander Lvl 2
Message 3 of 5

Re: Best practice for communicating dependencies (in python)

Hi @WatKey,

 

Welcome to the Github Community Forum!

 

When you develop a python project is necessary to use some sort of virtual environment. I wrote a couple weeks ago some notes about venv and reproducibility to mantain and share a pyhton project: pip venv.

 

Hope this help, ask if you have more questions.

 

-Gabriele-

 

Mark helpfull posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great contents!

Highlighted
Copilot Lvl 3
Message 4 of 5

Re: Best practice for communicating dependencies (in python)

What is pip venv and why do we need this ? How to vet started with this?
Highlighted
Commander Lvl 2
Message 5 of 5

Re: Best practice for communicating dependencies (in python)

Venv is a pyhton package that can create a virtual environment where you can install and do staff without affect your local environment, this can be use to create reproducibility for your application.

 

To get started with this you can read my post pip venv or use the official docs here.