1

I tried installing pubnub. I went through the website of pubnub and did as it was told on the website. https://www.pubnub.com/blog/2015-07-22-getting-started-with-raspberry-pi-2-and-pubnub-in-python-programming-language/

While I tried to do pip install pubnub (sudo pip install pubnub), the following error occured. I can't install it no matter how much I try.

Here is the error:

Exception:
Traceback (most recent call last):
 File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
 status = self.run(options, args)
 File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, 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 1178, in prepare_files
 url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
 File "/usr/lib/python2.7/dist-packages/pip/index.py", line 196, in find_requirement
 url_name = self._find_url_name(Link(self.index_urls[0], trusted=True), url_name, req) or req.url_name
 File "/usr/lib/python2.7/dist-packages/pip/index.py", line 361, in _find_url_name
 page = self._get_page(index_url, req)
 File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_page
 session=self.session,
 File "/usr/lib/python2.7/dist-packages/pip/index.py", line 694, in get_page
 req, link, "connection error: %s" % exc, url,
TypeError: __str__ returned non-string (type Error)
Storing debug log for failure in /home/pi/.pip/pip.log

Does anybody have any solution so that I can install it?

asked Sep 14, 2016 at 14:36

1 Answer 1

1

Can you check your Raspberry pi time. Sometimes it so happens when your system time is inaccurate the pip installation fails. I have faced this issue once.

You may check the articles below on how to set the time. How to force NTPD to update date/time after boot?

Hope this helps.

answered Sep 14, 2016 at 16:57
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.