09 November 2017

Using Flask on dreamhost problems

We're updating our website here at Thought Into Design to reflect our firmer move into education. We wanted a site that discussed the kinds of things we're offering so that people know.

But a new design meant uploading a new site! And we had problems with Dreamhost and thought to document them here in case they're any use to anyone else.

Matt Carrier has a great page on setting flask up at Dreamhost that we used before for our Salstat page. All was going well until we had to install Flask itself with...

easy_install flask
...when our server told us that it could not be installed! Fundamentally, it could not find the flask package which seemed odd. We tried upgrading pip and setuptools but that crapped out too.

Searching for flask
Reading http://pypi.python.org/simple/flask/
Couldn't find index page for 'flask' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for flask
error: Could not find suitable distribution for Requirement.parse('flask')
(test.thoughtintodesign.com)[clayton]$ cd ../public/
(test.thoughtintodesign.com)[clayton]$ easy_install flask
Our solution was to change directory to the lib directory, then download and install pip manually like this...

lib/python2.7/site-packages
wget bootstrap.pypa.io/get-pip.py
pip install flask

...and Flask installed nicely.

No comments: