How do I setup virtualenv environments for Python 2.4 and 2.5 versions on Windows?

前端 未结 1 895
旧巷少年郎
旧巷少年郎 2021-02-03 14:19

I have this installed

  • on Windows 7
  • Python 2.7.6 (my default, with virtualenv installed)
  • Python 2.4.4
  • Python 2.5.4
  • Python 2.6.6<
相关标签:
1条回答
  • 2021-02-03 14:41

    You need old version virtualenv version < 1.8
    virtualenv version 1.7 can be downloaded from (https://pypi.python.org/pypi/virtualenv/1.7).

    However, you don't need to install that version, but just need to use virtualenv.py inside of package. What this means is running virtualenv.py by your default python (python2.7)

    on Linux / Mac, command will be like below

    python /{download folder path}/virtualenv-1.7/virtualenv.py -p python2.4 {wanted environment name}

    For your case, environment is windows and if Python2.7 path is set as environment variable and also assume that you download virtualenv-1.7.tar.gz under c:\temp, then below is the exact command you want to run after unarchiving it.

    C:\Users\martin> python C:\temp\virtualenv-1.7\virtualenv.py -p C:\apps\Python24\python.exe env24_v

    0 讨论(0)
提交回复
热议问题