安装Python Flask而不使用pip [英] Install Python Flask without using pip

查看:473
本文介绍了安装Python Flask而不使用pip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我没有pip,virtualenv和easy_install。



这个问题的上下文是我在一个严格控制的AIX计算机上。如果不经过几层管理,我无法安装任何编译的代码。但是,我可以安装python模块。

安装Python 2.7。



我有一些现有的Python代码生成一个报告。

我希望使用Flask在Web服务上提供这个报表。



我是使用瓶子,但我打算使用https,并支持https下的Flask似乎更直接。



我想把烧瓶库(和它的依赖)到我的项目很像瓶子被放置到项目中。



我试过了:我下载了烧瓶tarball,看着它。它有很多东西,我不知道该怎么办。例如,有一个makefile。

解决方案

是的,你可以,但它会有点困难。 b

从这里得到烧瓶源代码并提取它。



https://pypi.python.org/packages/source/F/Flask/Flask-0.10.1.tar.gz

将会有一个名为 setup.py 的文件,您可以看到依赖关系他们在这里。

 'Werkzeug> = 0.7',https://pypi.python.org/packages /source/W/Werkzeug/Werkzeug-0.10.4.tar.gz 
'Jinja2> = 2.4',https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3 .tar.gz
'itsdangerous> = 0.21',https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-0.24.tar.gz
MarkupSafe == 0.23,https ://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz

从pypi下载所有这些文件并使用 python setup.py install 来安装每个模块。



可以在烧瓶源代码文件夹中运行 python setup.py install 来安装烧瓶。



现在你已经知道系统了用烧瓶。

: - )

How do I install Python Flask without using pip?

I do not have pip, virtualenv nor easy_install.

The context of this question is that I am on a tightly controlled AIX computer. I cannot install any compiled code without going through several layers of management. However, I can install python modules.

Python 2.7 is installed.

I have some existing python code that generates a report.

I want to make that report available on a web service using Flask.

I am using bottle, but I am going to want to use https, and support for https under Flask seems much more straight forward.

I would like to put the flask library (and its dependencies) into my project much like bottle is placed into the project.

What I tried: I downloaded the flask tarball and looked at it. It had quite a bit of stuff that I did not know what to do with. For instance, there was a makefile.

解决方案

Yes you can but it will be little difficult.

get flask source code from this and Extract it.

https://pypi.python.org/packages/source/F/Flask/Flask-0.10.1.tar.gz

There will be a file with name setup.py in that you can see dependencies , I listed them here. download those packages and install them first.

'Werkzeug>=0.7',    https://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-0.10.4.tar.gz
'Jinja2>=2.4',  https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
'itsdangerous>=0.21' , https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-0.24.tar.gz
MarkupSafe==0.23 ,https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz

download all those from pypi and install using python setup.py install for every module.

Now you can install flask by running python setup.py install in the flask source code folder.

Now you system is acquainted with flask.

:-)

这篇关于安装Python Flask而不使用pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆