Issues

Issue #66 resolved

Cannot define python executable

Inkvi
created an issue

{{{

!bash

macbook-pro-inkvi:virtualenvwrapper-2.5.2 inkvimac$ mkvirtualenv temp New python executable in temp/bin/python2.6 Also creating executable in temp/bin/python Traceback (most recent call last): File "/usr/local/bin/virtualenv", line 8, in <module> load_entry_point('virtualenv==1.4.9', 'console_scripts', 'virtualenv')() File "/Library/Python/2.6/site-packages/virtualenv.py", line 526, in main use_distribute=options.use_distribute) File "/Library/Python/2.6/site-packages/virtualenv.py", line 609, in create_environment site_packages=site_packages, clear=clear)) File "/Library/Python/2.6/site-packages/virtualenv.py", line 785, in install_python py_executable) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py", line 88, in copy copyfile(src, dst) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py", line 52, in copyfile fsrc = open(src, 'rb') IOError: [Errno 2] No such file or directory: '/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/python2.6'

}}}

Tried to use export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python but didn't help.

I got this error only on MacOs X, everything work fine on Ubuntu machine.

Comments (6)

  1. Inkvi reporter

    Yes, it works fine.

    macbook-pro-inkvi:cast inkvimac$ source venv/bin/activate
    (venv)macbook-pro-inkvi:thecastingdirector inkvimac$ 
    
  2. Doug Hellmann repo owner

    You're activating an existing environment there. What happens if you run "virtualenv temp", which would be the analog to "mkvirtualenv temp" that was failing in the description of the problem.

  3. Inkvi reporter

    Sorry, you are right. Got the same error.

    macbook-pro-inkvi:dev inkvimac$ virtualenv temp
    New python executable in temp/bin/python2.6
    Also creating executable in temp/bin/python
    Traceback (most recent call last):
      File "/usr/local/bin/virtualenv", line 8, in <module>
        load_entry_point('virtualenv==1.4.9', 'console_scripts', 'virtualenv')()
      File "/Library/Python/2.6/site-packages/virtualenv.py", line 526, in main
        use_distribute=options.use_distribute)
      File "/Library/Python/2.6/site-packages/virtualenv.py", line 609, in create_environment
        site_packages=site_packages, clear=clear))
      File "/Library/Python/2.6/site-packages/virtualenv.py", line 785, in install_python
        py_executable)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py", line 88, in copy
        copyfile(src, dst)
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/shutil.py", line 52, in copyfile
        fsrc = open(src, 'rb')
    IOError: [Errno 2] No such file or directory: '/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/python2.6'
    
  4. Doug Hellmann repo owner

    OK, so the problem has something to with the virtualenv configuration.

    How was virtualenv installed? Where is it? Which version of Python is it using?

  5. Inkvi reporter

    Unfortunately, i don't remember how i installed virtualenv, but i used pip install command most likely and python that comes with MacOs by default (2.6.1). Anyway, i have downloaded the last virtualenv version (1.5.1) from repository and it helps me to resolve problem! Thanks for your help!

  6. Log in to comment