Serjik Serjik - 1 month ago 47
Python Question

How to install Flask offline?

I've downloaded Flask on my pc, then I'm disconnected, now I need to install Flask without internet connection. What else I need to install Flask offline and in which order should I install them?


You need to download all of flask's dependencies:

  • Werkzeug>=0.7
  • Jinja2>=2.4, which requires:
    • MarkupSafe
    • Babel>=0.8, which requires:
      • pytz
  • itsdangerous>=0.21
  • click >= 2.0

Install them in that order before you install Flask.

You can install the downloaded packages in several ways, the easiest is to use pip, which you then also need to download and install first if you don't already have it. Then you just do

pip install ThePackageFile-0.0.0.tgz

If you don't have pip installed on the target machine, you can expand the archive and then run the script:

tar xvzf ThePackageFile-0.0.0.tgz
# .. some output
python ThePackageFile/ install