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.
:-)
On Debian-based systems you can install with Apt.
For Python 3.x use:
sudo apt-get install python3-flask
For Python 2.x use:
sudo apt-get install python-flask
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With