I am using Pywapi for accessing weather API.

But Pythonanywhere is unable to import Pywapi??

My code is :

import pywapi

weather_com_result = pywapi.get_weather_from_weather_com('TUXX0014')**

However it is working properly on my local Pycharm tool/

Can you please share any alternative?? :(

Pywapi isn't installed by default, but if you run this from a bash console:

pip2.7 install --user

...then it should work. Don't forget to change the 2.7 to reflect the version of Python you want to install it for.

thank you for your response.

but i can install other softwares but failed to install pwapi with following error

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/", line 122, in main
    status =, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/local/lib/python2.7/dist-packages/pip/", line 1197, in prepare_files
  File "/usr/local/lib/python2.7/dist-packages/pip/", line 1375, in unpack_url
  File "/usr/local/lib/python2.7/dist-packages/pip/", line 546, in unpack_http_url
    resp = session.get(target_url, stream=True)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/", line 468, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pip/", line 237, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/", line 456, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/", line 585, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/", line 179, in resolve_redirects
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/", line 559, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/", line 378, in send
    raise ProxyError(e)
ProxyError: ('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',))

[edited by admin: formatting]

Ah, it looks like the URL redirected to a different site that wasn't on our whitelist for free users. I've added it, so it should work now.

Thanks it works :)

Excellent, thanks for confirming!