I have been working on a project for some time, writing Python scripts spontaneously as I needed them. I'd like to pick out some important ones and put them neatly into a package and then a git repository in a way which makes it easy for co-workers to use them. How can I find out all required Python packages for this specific collection of scripts (which is now a package itself), so I can list them in a requirements.txt
? I read up on pip freeze
, but this will list everything in the current virtual environment, more than is needed by the scripts I have collected in my new package.
There is a module called pipreqs
**pip install pipreqs
pipreqs /GitHub/FolderName**
Reference : https://pypi.org/project/pipreqs/
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.