Bundle All Packages Required from a Python Script into a Folder

I have my Python script and my requirements.txt ready.

What I want to do is to get all the packages listed in the "requirements.txt" into a folder. In the bundle, I'd for example have the full packages of "pymysql", "bs4" as well as all their dependencies.

I have absolutely no idea how to do this. Could you help me please? I am stuck and I am really struggling with this.

I am using Python 3.6

I am using "pip download -r requirements.txt" but it's not downloading the dependencies and outputs me only.whl files whereas I'm looking for "proper" folders..

3

1 Answer

Couldn't you just use a virtual environment (virtualenv folder_name) and then activate it unless you are looking for something else.

Once it's activated install of your libraries and drown its there using pip install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest