itsnej
Posts: 3
Joined: Sat Oct 13, 2018 9:02 pm

'Build a Python Web server with flask' - BLOCKER. Cant get flask.

Sat Oct 13, 2018 9:40 pm

Hey guys,

Finally decided to start using my pi for something and worked through a few physical computing tutorials, now moved on to the 'Build a Python Web server with flask' project, but have encountered a problem. Project link https://projects.raspberrypi.org/en/pro ... th-flask/3'

When I go to

Code: Select all

sudo apt-get install python3-flask
, I get the below output, which says it canT find flask.

Image


I've spent a few hours today and yesterday looking for solutions, and have done sudo update, upgrade and reboots a few times. I edited my sources.list and uncommented the 3rd line and at least made some progress when i do a sudo apt-get source flask, when im told its:
Skipping already downloaded files 'flask_0.8-1.dsc', flask_0.8.orig.tar.gz, and flask_0.8-1.debian.tar.gz, but I don't know what to do from there:
Image


Is there any way somebody could help me get flask imported and installed, or explain what I need to do please? Real head scratcher for me and I'm a little bit surprised and disappointed to have been stumped so easily.
Cheers!

User avatar
topguy
Posts: 4996
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: 'Build a Python Web server with flask' - BLOCKER. Cant get flask.

Sun Oct 14, 2018 12:38 am

Which version of Raspbian are you running ?

The name of the package should (afaik) be "python-flask" or "python3-flask" in Raspbian Stretch.
You can probably check with the command "apt-cache search flask"

Of course since this is Python I guess "pip install flask" or "pip3 install flask" also could be an option.

itsnej
Posts: 3
Joined: Sat Oct 13, 2018 9:02 pm

Re: 'Build a Python Web server with flask' - BLOCKER. Cant get flask.

Sun Oct 14, 2018 6:40 pm

Looks like I'm using Wheezy version 7, and some quick googling seems to tell me I should be using Jessie. I thought doing the sudo-apt updates and installs would have put me on the best possible footing with regards to OS tbh.

Will try Jessie out and report back if it works.

DirkS
Posts: 9491
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: 'Build a Python Web server with flask' - BLOCKER. Cant get flask.

Sun Oct 14, 2018 6:59 pm

itsnej wrote:
Sun Oct 14, 2018 6:40 pm
Looks like I'm using Wheezy version 7, and some quick googling seems to tell me I should be using Jessie.
Actually, you should be using Stretch.

mfa298
Posts: 1353
Joined: Tue Apr 22, 2014 11:18 am

Re: 'Build a Python Web server with flask' - BLOCKER. Cant get flask.

Mon Oct 15, 2018 8:36 am

itsnej wrote:
Sun Oct 14, 2018 6:40 pm
I thought doing the sudo-apt updates and installs would have put me on the best possible footing with regards to OS tbh.
Apt will normally only update within a version, so you'll stay on wheezy. There are ways to upgrade from Wheezy -> Jessie > Stretch with apt (and editing some files) but it's generally easier and quicker to get the latest image and use that.

itsnej
Posts: 3
Joined: Sat Oct 13, 2018 9:02 pm

Re: 'Build a Python Web server with flask' - BLOCKER. Cant get flask.

Mon Oct 15, 2018 7:42 pm

Cool, so I updated to Jessie and seem to have got it working, thanks a lot for that.

I'll look at moving to Stretch soon, but for now Jessie is working great.

Cheers!

Return to “Beginners”