#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Virtualenv for updated python27


    I installed virtualenv when Python was 2.6. Now I have updated python to 2.7.3. And in normal situations, python27 is working because I set the path properly.

    But when it comes to virtualenv, it is not.

    How can I use python27 for virtualenv by default?

    Code:
    % mkvirtualenv --no-site-packages --python=/usr/local/Cellar/python/2.7.3/bin/ py27
    gives an error

    Code:
    /usr/local/bin/virtualenv:5: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
      from pkg_resources import load_entry_point
    /usr/local/bin/virtualenv:5: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
      from pkg_resources import load_entry_point
    Running virtualenv with interpreter /usr/local/Cellar/python/2.7.3/bin/
    Traceback (most recent call last):
      File "/usr/local/bin/virtualenv", line 8, in <module>
        load_entry_point('virtualenv==1.8.2', 'console_scripts', 'virtualenv')()
      File "/Library/Python/2.6/site-packages/virtualenv.py", line 897, in main
        popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
        errread, errwrite)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
        raise child_exception
    OSError: [Errno 13] Permission denied
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    How about running as root? put sudo in front of that command.
    % sudo mkvirtualenv ...
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo