I'm attempting to set up flask to serve as a local webpage to interface with my pi, but for some reason it keeps returning errors when trying to download flask:
sudo pip install flask -v
Downloading/unpacking flask
Could not fetch URL http://pypi.python.org/simple/flask: <urlopen error [Errno -5] No address associated with hostname>
Will skip URL http://pypi.python.org/simple/flask when looking for download links for flask
Could not fetch URL http://pypi.python.org/simple/: <urlopen error [Errno -5] No address associated with hostname>
Will skip URL http://pypi.python.org/simple/ when looking for download links for flask
Cannot fetch index base URL http://pypi.python.org/simple/
Could not fetch URL http://pypi.python.org/simple/flask/: <urlopen error [Errno -5] No address associated with hostname>
Will skip URL http://pypi.python.org/simple/flask/ when looking for download links for flask
Could not find any downloads that satisfy the requirement flask
No distributions at all found for flask
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 978, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 157, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for flask
Storing complete log in /root/.pip/pip.log
Does anyone know what's going on here, and how to fix it?
Using sudo apt-get install python flask
returns:
sudo apt-get install python-flask
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
javascript-common libjs-jquery python-jinja2 python-markupsafe python-openssl python-werkzeug wwwconfig-common
Suggested packages:
apache2 httpd python-jinja2-doc python-openssl-doc python-openssl-dbg ipython python-genshi python-lxml python-memcache
libjs-sphinxdoc mysql-client postgresql-client
The following NEW packages will be installed:
javascript-common libjs-jquery python-flask python-jinja2 python-markupsafe python-openssl python-werkzeug wwwconfig-common
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 149 kB/2,003 kB of archives.
After this operation, 6,414 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://mirrordirector.raspbian.org/raspbian/ wheezy/main python-openssl armhf 0.13-2+rpi1
404 Not Found
Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/p/pyopenssl/python-openssl_0.13-2+rpi1_armhf.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Thanks to Joan for the answer -
Running sudo apt-get update seemed to fix any issues with installing flask.
ping 8.8.8.8
do anything? It could also be a problem with one of the commands being called on to download what is required -wget
,curl
etc