0

You may smile when read this question, but.. I read in many places how to do this work, but I have this trouble:

I use a windows 7 system; I already installed python 3.2 and the module virtualenv; when I put the instruction: virtualenv -p /usr/bin/python 3.2
it send an syntax error. If I put the instruction: /usr/bin/virtualenv-3.2 It send the same syntax error. How do I create a virtualenv? Thanks for your help

Starter
  • 23
  • 1
  • 3
    How about a traceback? An error message? Literally any more information would help. We can't help you if we can't find out what the problem *actually* is. – Alyssa Haroldsen Jul 07 '15 at 22:38
  • ....I wasn't aware that `/usr/` existed on Windows 7. Actually, I'm pretty bloody sure it doesn't :P Have you considered leaving out that argument and just running `virtualenv [name_of_virtual_environment]`? – NightShadeQueen Jul 07 '15 at 22:43
  • 1
    Piggybacking off of @NightShadeQueen, maybe the problem is you're supposed to be doing this in a cygwin shell? – Alyssa Haroldsen Jul 07 '15 at 23:05
  • Just save yourself some trouble and don't do it in Windows. I know this is not a proper answer, but it wasn't a proper question either. Console things don't work properly on Windows. They just don't. I worked with python for 8 years, and I'd be terrified to have to get anything working on Windows. Get virtualbox, install ubuntu or whatever, it's free and really easy. – letitbee Jul 07 '15 at 23:10

1 Answers1

1

I believe the problem here is the path that you specify, which is unix based and not windows 7. Try to use the path to your python interpreter location on your windows system for the -p argument.

like for example:

mkvirtualenv -p c:/your/path/to/python2.5

May I give u some additional advice/tip:

In the past I've used virtualenvwrapper, which provides a set of function that make working with virtual environment a lot easier. I really loved it!

In order to install it, you should make sure that virtual environment is already installed, which I believe is the case for you.

Next run:

pip install virtualenvwrapper

next you can follow the simple steps here

DJanssens
  • 9,746
  • 7
  • 22
  • 40
  • 1
    Note: `pip` is only included on Windows on [Python 2.7.9+ and Python 3.4+](http://stackoverflow.com/a/12476379/1530134). – Alyssa Haroldsen Jul 07 '15 at 23:13
  • Since OP mentioned he installed 3.2, this won't be an issue I presume? I wasn't aware of this though, so thank you! – DJanssens Jul 07 '15 at 23:15
  • 1
    I tried this and works fine: >set VENV=c:\myprojects folowing: >c:\Python33\python -m venv %VENV% and voila.. – Starter Jul 08 '15 at 16:42