3

I just wanted to setup a small development environment with Python 3.

I had no problems installing pip and virtualenv, however virtualenvwrapper does not seem to support Python 3 yet (as it states on the mercurial repo).

Trying to install it with pip yields the following error:

  Running setup.py install for virtualenvwrapper

    changing mode of build/scripts-3.2/virtualenvwrapper.sh from 644 to 755
    Skipping installation of /usr/local/lib/python3.2/dist-packages/virtualenvwrapper/__init__.py (namespace package)
    Installing /usr/local/lib/python3.2/dist-packages/virtualenvwrapper-2.11.1-py3.2-nspkg.pth
    changing mode of /usr/local/bin/virtualenvwrapper.sh to 755
      File "/usr/local/lib/python3.2/dist-packages/virtualenvwrapper/hook_loader.py", line 137
        print '  %-10s -- %s' % (ep.name, inspect.getdoc(plugin) or '')
                            ^
    SyntaxError: invalid syntax

      File "/usr/local/lib/python3.2/dist-packages/virtualenvwrapper/user_scripts.py", line 40
        except OSError, msg:
                      ^
    SyntaxError: invalid syntax

Successfully installed virtualenvwrapper
Cleaning up...

Even though the last line states successfully installed I can not invoke the virtualenvwrapper commands.

Does anyone know an alternative to it that works with Python 3?

EDIT:

For anyone coming back to this question - a version that supports Python 3 has just been released: Virtualenvwrapper (30/01/2012).

3
  • Anything wrong with just using virtualenv? Works fine for my current Python 3 project... Commented Jan 25, 2012 at 18:54
  • 1
    It's not really a big problem - you just get used to the comfort of the wrapper. Commented Jan 25, 2012 at 19:06
  • The Python part is only 3 fairly small files. You can probably port it quite easily. Commented Jan 25, 2012 at 23:18

2 Answers 2

6

Normally I would say "Fork it and port it". It's a small program, under a 1000 lines of code, most of which is written in clear and best practices by Dough Hellman. Porting it is probably going to be dead simple and a good exercise.

However in this case, all you need to do is notice in the bitbucket page that there are two pull requests waiting already, one which is a Python 3 compatibility fix. You can probably check out and use that one. https://bitbucket.org/dakra/virtualenvwrapper/overview

Sign up to request clarification or add additional context in comments.

1 Comment

I knew I forgot to look somewhere ... even though the forks would have been a really obvious place to look.
3

Python 3.3 comes with an integrated virtual environnement solution called venv

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.