WebFaction
Community site: login faq

I get the following error when I try creating a virtualenv using either mkvirtualenv or virtualenv. Any one with an idea on on what is going wrong?

All the folders with the ValueError exist

$  virtualenv demo
New python executable in demo/bin/python2.7
Also creating executable in demo/bin/python
Installing setuptools, pip...
  Complete output from command /home/vyura/.virtualenvs/demo/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 245, in _get_queued_page
    page = self._get_page(location, req)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 335, in _get_page
    return HTMLPage.get_page(link, req, cache=self.cache)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 452, in get_page
    resp = urlopen(url)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/download.py", line 85, in __call__
    response = urllib2.urlopen(self.get_request(url))
  File "/usr/local/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 396, in open
    protocol = req.get_type()
  File "/usr/local/lib/python2.7/urllib2.py", line 258, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: .

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 245, in _get_queued_page
    page = self._get_page(location, req)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 335, in _get_page
    return HTMLPage.get_page(link, req, cache=self.cache)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 452, in get_page
    resp = urlopen(url)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/download.py", line 85, in __call__
    response = urllib2.urlopen(self.get_request(url))
  File "/usr/local/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 396, in open
    protocol = req.get_type()
  File "/usr/local/lib/python2.7/urllib2.py", line 258, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /home/vyura/lib/python2.7

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 761, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 245, in _get_queued_page
    page = self._get_page(location, req)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 335, in _get_page
    return HTMLPage.get_page(link, req, cache=self.cache)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/index.py", line 452, in get_page
    resp = urlopen(url)
  File "/home/vyura/lib/python2.7/pip-1.1-py2.7.egg/pip/download.py", line 85, in __call__
    response = urllib2.urlopen(self.get_request(url))
  File "/usr/local/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 396, in open
    protocol = req.get_type()
  File "/usr/local/lib/python2.7/urllib2.py", line 258, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: /home/vyura/lib/python2.7/virtualenv_support

Ignoring indexes: http://pypi.python.org/simple/
Downloading/unpacking setuptools
  Could not find any downloads that satisfy the requirement setuptools
No distributions at all found for setuptools
Storing complete log in /home/vyura/.pip/pip.log
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "/home/vyura/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==1.11.6', 'console_scripts', 'virtualenv')()
  File "/home/vyura/lib/python2.7/virtualenv.py", line 824, in main
    symlink=options.symlink)
  File "/home/vyura/lib/python2.7/virtualenv.py", line 992, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/home/vyura/lib/python2.7/virtualenv.py", line 960, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/home/vyura/lib/python2.7/virtualenv.py", line 902, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/vyura/.virtualenvs/demo/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1

asked 14 Aug '14, 13:01

simiyu
2615
accept rate: 100%


I looked up your account and found that you have a "virtualenv.py" in your ~/lib/python2.7 directory, but no actual virtualenv egg or module directory.

My advice is that you manually delete everything related to virtualenv and virtualenvwrapper from your ~/bin and ~/lib/python2.7 directories, then run "pip-2.7 install virtualenvwrapper" to reinstall everything at once.

permanent link

answered 14 Aug '14, 16:09

seanf
12.2k42136
accept rate: 37%

edited 14 Aug '14, 16:09

Cleaned up the directories as you had said and now I am getting this error with pip

IOError: [Errno 13] Permission denied: u'/usr/local/lib/python2.7/site-packages/virtualenv.py'

Update: Installed virtualenvwrapper with easy_install and it works ok. Can create virtualenvs again. Thanks.

(15 Aug '14, 09:34) simiyu
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×55
×1

question asked: 14 Aug '14, 13:01

question was seen: 4,353 times

last updated: 15 Aug '14, 09:46

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM