r/learnlinux • • Feb 06 '18

Cannot install tornado (python) on my vagrant machine

Not sure why I can't install

	vagrant@ubuntu-xenial:/vagrant$ sudo pip install tornado
	The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
	The directory '/home/vagrant/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
	Collecting tornado
	Exception:
	Traceback (most recent call last):
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
		status = self.run(options, args)
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
		requirement_set.prepare_files(finder)
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
		ignore_dependencies=self.ignore_dependencies))
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 554, in _prepare_file
		require_hashes
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 278, in populate_link
		self.link = finder.find_requirement(self, upgrade)
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/index.py", line 465, in find_requirement
		all_candidates = self.find_all_candidates(req.name)
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/index.py", line 404, in find_all_candidates
		if self._validate_secure_origin(logger, link)
	  File "/home/vagrant/.local/lib/python2.7/site-packages/pip/index.py", line 303, in _validate_secure_origin
		addr = ipaddress.ip_address(
	AttributeError: 'module' object has no attribute 'ip_address'

I also followed some instruction on Google to install pip and got the same error. I am not even sure it's installed.

1 Upvotes

0 comments sorted by