Results 1 to 3 of 3

Thread: virtualenv

  1. #1
    Join Date
    Jun 2008
    Location
    netherlands
    Posts
    584

    Default virtualenv

     I see my virtualenv uses python 3.4 instead of 2.7. OpenSUSE 12.3 x86-64
    How to get back virtualenv python 2.7.

  2. #2

    Default Re: virtualenv

    Quote Originally Posted by anton View Post
    I see my virtualenv uses python 3.4 instead of 2.7. OpenSUSE 12.3 x86-64
    How to get back virtualenv python 2.7.
    ???
    Haven't you written that you upgraded to 13.2 in the other thread?

    And just to be sure, you need python-virtualenv (not python3-virtualenv) for python 2.7.3.

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,117
    Blog Entries
    2

    Default Re: virtualenv

    Although I don't have an appropriate testbed to do this,

    Option 1 (probably easiest)
    I'd expect that simply uninstalling python3-virtualenv should return the system to Python 2.7.

    After installing (and maybe a reboot), you can test simply running your python command (of course, not virtualenv).

    Option 2 (probably easy but not easiest)
    A little more advanced but beyond my intended scope of this post could be to try installing python 2.7 from the python repositories using virtualenv.

    Option 3 (probably possible but plenty of work)
    Or (but this may be the point of distributing different virtualenv packages for python 2 an python 3), you could try configuring your current virtualenv to point to the existing python 2.7 binary and libraries... But that of course will require inspecting how openSUSE installed all its python binaries and libraries.

    The whole purpose to running virtualenv is to be able to switch between different python environments. This would be particularly valuable when Developing since then apps need to be built to a target environment regardless what might be installed on the Dev machine. Or, you might get caught maintaining apps built to older environments or need to build to a common environment when working in a team.

    If none of the above apply to you, then virtualenv isn't necessary. Just use pip to install your app and have an appropriate version of python running globally.

    TSU

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •