WebFaction
Community site: login faq

Hi, Not sure if I am using the right tool here, as I suspect this is a support request, so please point me elsewhere if necessary.

Anyway, virtualenv doesn't work with Python 3 on my account. Python 3 support was added in version 1.6 according to http://pypi.python.org/pypi/virtualenv while the installed version is 1.5.1.

Could this be updated? Or should I just download the script and run it myself (will that work?)?

More details (as requested):

[acooke@web99 colorlessgreen]$ virtualenv --python=python3.2 env
Running virtualenv with interpreter /usr/local/bin/python3.2
  File "/home/acooke/lib/python2.7/virtualenv-1.5.1-py2.7.egg/virtualenv.py", line 17
    except ImportError, e:
                      ^
SyntaxError: invalid syntax

This is expected, because, as I said, support for Python 3 wasn't added until 1.6 and the version installed is 1.5.1 (see path above in error).

UPDATE: Well, just downloading the latest version and running it by hand is sufficient, so this is not urgent.

Thanks, Andrew

asked 20 Jan '13, 14:11

acooke
324
accept rate: 0%

edited 20 Jan '13, 14:28

Can you provide further details on what is not working?

(20 Jan '13, 14:18) bmeyer71 ♦♦

i've added an example.

(20 Jan '13, 14:24) acooke

You will need to update the virtualenv package you have installed in your home directory then to support Python 3.x

(20 Jan '13, 14:30) bmeyer71 ♦♦

Python ships with its own implementation since version 3.3, so you do not need to install third party modules, like virtualenv.

You can create your python3.3 or 3.4 virtual envs using python3.3 -m venv myenv or python3.4 -m venv myvenv.

See the related documentation for the venv module for more info.

permanent link

answered 14 Jun '14, 09:56

iliasr ♦♦
2.1k14
accept rate: 35%

edited 14 Jun '14, 09:57

I have the same problem. Has someone solved this already? I have version 1.11.6 and trying to install with python 3.4.

permanent link

answered 14 Jun '14, 06:34

Ivan Rivera
12
accept rate: 0%

edited 14 Jun '14, 06:40

The real problem is that our mod_wsgi apache stop script for Python 3 applications still uses Python 2 code. We'll update them to be cross-compatible with both Python 2 and 3.

In the mean time, you can change the shebang line (for just the apache2/bin/stop script) to:

#!/usr/bin/env python2.7
(11 Oct '14, 06:09) ryans ♦♦
permanent link

answered 16 Oct '14, 11:07

davidvld
41126
accept rate: 0%

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:

×337
×55
×23

question asked: 20 Jan '13, 14:11

question was seen: 7,417 times

last updated: 16 Oct '14, 11:07

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