Processing math: 100%

Saturday, November 23, 2019

Find all required python library inside a project

I was using Python3.8 throughout a project but suddenly one of the required library require Python3.7 to work with, therefore I need to mirgrate everything to another virtual environment.

So I need to know the dependency that I was using in order to do migration, just do the following:

We start off installing
1
pip install pipreqs
Next cd into working directory and then
1
[working directory]>pipreqs .
which yields a message:
1
INFO: Successfully saved requirements file in .\requirements.txt
that looks like the following:

now switch into our virtual environment and pip install them:
1
2
pipenv shell
pip install -r requirements.txt
and we are done.

No comments:

Post a Comment