如何离线安装Flask? [英] How to install Flask offline?
问题描述
我已经在计算机上下载了Flask,然后断开了连接,现在我需要在没有互联网连接的情况下安装Flask.脱机安装Flask还需要什么,应该按什么顺序安装?
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?
推荐答案
您需要下载flask的所有依赖项:
You need to download all of flask's dependencies:
- Werkzeug> = 0.7
- Jinja2> = 2.4,需要:
- MarkupSafe
- Babel> = 0.8,它需要:
- pytz
在安装Flask之前,请先按顺序安装它们.
Install them in that order before you install Flask.
您可以通过多种方式安装下载的软件包,最简单的方法是使用 pip ,如果尚未安装,则还需要先下载并安装.那你就做
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
如果目标计算机上未安装pip,则可以展开存档,然后运行
setup.py
脚本:If you don't have pip installed on the target machine, you can expand the archive and then run the
setup.py
script:tar xvzf ThePackageFile-0.0.0.tgz # .. some output python ThePackageFile/setup.py install
这篇关于如何离线安装Flask?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!