WebFaction
Community site: login faq

I have virtualenvwrapper installed, and had previously created virtual environments with it. But now when I try to make a new virtual environment, I get the following error:

Using base prefix '/usr/local'
New python executable in /home/acounsel/.virtualenvs/ndungu/bin/python3.6
Not overwriting existing python script /home/acounsel/.virtualenvs/ndungu/bin/python (you must use /home/acounsel/.virtualenvs/ndungu/bin/python3.6)
Installing setuptools, pip, wheel...
  Complete output from command /home/acounsel/.virt...ndungu/bin/python3.6 - setuptools pip wheel:
  Traceback (most recent call last):
  File "<stdin>", line 9, in <module>
  File "/usr/local/lib/python3.6/pkgutil.py", line 624, in get_data
    importlib._bootstrap._load(spec))
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/acounsel/lib/python3.6/pip/_vendor/requests/__init__.py", line 94, in <module>
    from pip._internal.utils.compat import WINDOWS
  File "/home/acounsel/lib/python3.6/pip/_internal/__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/acounsel/lib/python3.6/pip/_internal/cli/autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/acounsel/lib/python3.6/pip/_internal/cli/main_parser.py", line 12, in <module>
    from pip._internal.commands import (
  File "/home/acounsel/lib/python3.6/pip/_internal/commands/__init__.py", line 6, in <module>
    from pip._internal.commands.completion import CompletionCommand
  File "/home/acounsel/lib/python3.6/pip/_internal/commands/completion.py", line 6, in <module>
    from pip._internal.cli.base_command import Command
  File "/home/acounsel/lib/python3.6/pip/_internal/cli/base_command.py", line 18, in <module>
    from pip._internal.download import PipSession
  File "/home/acounsel/lib/python3.6/pip/_internal/download.py", line 325, in <module>
    class PipSession(requests.Session):
AttributeError: module 'pip._vendor.requests' has no attribute 'Session'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/home/acounsel/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/home/acounsel/lib/python3.6/virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "/home/acounsel/lib/python3.6/virtualenv.py", line 945, in create_environment
    download=download,
  File "/home/acounsel/lib/python3.6/virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/home/acounsel/lib/python3.6/virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/acounsel/.virt...ndungu/bin/python3.6 - setuptools pip wheel failed with error code 1

Any idea what's wrong, and how I can fix it?

asked 09 Oct, 19:28

saraabi
133
accept rate: 0%


Reinstall pip and virtualenv with easy_install.

permanent link

answered 09 Oct, 22:04

johns ♦♦
5.3k212
accept rate: 23%

Thanks, I tried that and hit the same error. Here's what came out of the easy_install:

Best match: pip 18.1 pip 18.1 is already the active version in easy-install.pth Installing pip script to /home/acounsel/bin Installing pip3 script to /home/acounsel/bin Installing pip3.7 script to /home/acounsel/bin

Searching for virtualenv Best match: virtualenv 15.1.0 Adding virtualenv 15.1.0 to easy-install.pth file Installing virtualenv script to /home/acounsel/bin

(09 Oct, 23:10) saraabi

just did a pip install --upgrade virtualenv and that seemed to do the trick though!

(09 Oct, 23:29) saraabi
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
×53
×6

question asked: 09 Oct, 19:28

question was seen: 1,538 times

last updated: 09 Oct, 23:29

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 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