https://github.com/bndr/pipreqs Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} bndr / pipreqs Public * Notifications You must be signed in to change notification settings * Fork 384 * Star 6.3k pipreqs - Generate pip requirements.txt file based on imports of any project. Looking for maintainers to move this project forward. License Apache-2.0 license 6.3k stars 384 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 166 * Pull requests 36 * Actions * Projects 0 * Wiki * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights bndr/pipreqs This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 363 Commits .github/workflows .github/ workflows docs docs pipreqs pipreqs tests tests .editorconfig .editorconfig .gitignore .gitignore .python-version .python-version .tool-versions .tool-versions AUTHORS.rst AUTHORS.rst CONTRIBUTING.rst CONTRIBUTING.rst HISTORY.rst HISTORY.rst LICENSE LICENSE Makefile Makefile README.rst README.rst poetry.lock poetry.lock poetry.toml poetry.toml pyproject.toml pyproject.toml tox.ini tox.ini View all files Repository files navigation * README * Apache-2.0 license pipreqs - Generate requirements.txt file for any project based on imports [6874747073] [6874747073] https://codecov.io/gh/bndr/pipreqs/branch/ master/graph/badge.svg?token=0rfPfUZEAX [6874747073] Installation pip install pipreqs Obs.: if you don't want support for jupyter notebooks, you can install pipreqs without the dependencies that give support to it. To do so, run: pip install --no-deps pipreqs pip install yarg==0.1.9 docopt==0.6.2 Usage Usage: pipreqs [options] [] Arguments: The path to the directory containing the application files for which a requirements file should be generated (defaults to the current working directory) Options: --use-local Use ONLY local package info instead of querying PyPI --pypi-server Use custom PyPi server --proxy Use Proxy, parameter will be passed to requests library. You can also just set the environments parameter in your terminal: $ export HTTP_PROXY="http://10.10.1.10:3128" $ export HTTPS_PROXY="https://10.10.1.10:1080" --debug Print debug information --ignore ... Ignore extra directories, each separated by a comma --no-follow-links Do not follow symbolic links in the project --encoding Use encoding parameter for file open --savepath Save the list of requirements in the given file --print Output the list of requirements in the standard output --force Overwrite existing requirements.txt --diff Compare modules in requirements.txt to project imports --clean Clean up requirements.txt by removing modules that are not imported in project --mode Enables dynamic versioning with , or schemes | e.g. Flask~=1.1.2 | e.g. Flask>=1.1.2 | e.g. Flask --scan-notebooks Look for imports in jupyter notebook files. Example $ pipreqs /home/project/location Successfully saved requirements file in /home/project/location/requirements.txt Contents of requirements.txt wheel==0.23.0 Yarg==0.1.9 docopt==0.6.2 Why not pip freeze? * pip freeze only saves the packages that are installed with pip install in your environment. * pip freeze saves all packages in the environment including those that you don't use in your current project (if you don't have virtualenv). * and sometimes you just need to create requirements.txt for a new project without installing modules. About pipreqs - Generate pip requirements.txt file based on imports of any project. Looking for maintainers to move this project forward. Resources Readme License Apache-2.0 license Activity Stars 6.3k stars Watchers 56 watching Forks 384 forks Report repository Releases 5 v0.4.13 Latest Apr 14, 2023 + 4 releases Packages 0 No packages published Used by 32.8k * @epissteven1 * @a350-900ulr * @Asalulzy * @DTMhango * @gustawalk * @FirstTimeGaming * @pruedi123 * @talisma-cassoma + 32,769 Contributors 58 * * * * * * * * * * * * * * + 44 contributors Languages * Python 88.2% * Jupyter Notebook 8.6% * Makefile 3.2% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.