3

Let me start by saying I'm new at programming, mac osx, and bash.

I'm having a tough time getting virtualenvwrapper setup on my Mac osx 10.7.3. Its most certainly a path settings issue but I'm just having trouble getting it working.

Setup of virtualenvwrapper in .bashrc

export WORKON_HOME=$HOME/.Apps
source /usr/local/bin/virtualenvwrapper.sh

Some terminal output:

which easy_install
/usr/bin/easy_install

python -V
Python 2.7.1

When I run "source .bashrc" in the terminal I get no output.

When I run mkvirtualenv in the terminal I get:

Error [Errno 2] No such file or directory while executing command install_name_tool -change /System/Library/Fram.../Versions/2.7/Python @executable_path/../.Python 1/bin/python
Could not call install_name_tool -- you must have Apple's development tools installed
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==1.7.1.2', 'console_scripts', 'virtualenv')()
  File "/Library/Python/2.7/site-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 928, in main
    never_download=options.never_download)
  File "/Library/Python/2.7/site-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 1029, in create_environment
    site_packages=site_packages, clear=clear))
  File "/Library/Python/2.7/site-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 1347, in install_python
    py_executable])
  File "/Library/Python/2.7/site-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 966, in call_subprocess
    cwd=cwd, env=env)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
OSError: [Errno 2] No such file or directory 
harristrader
  • 1,181
  • 2
  • 13
  • 20

1 Answers1

3

You probably just need to install XCode. It should be a free (if large) download/install from the App Store.

For future reference, I highly recommend using a package manager and pip (instead of easy_install) for python development on OS X. My preferred package manager is Homebrew, but MacPorts and Fink are also good. Among other things, pip lets you uninstall stuff, which easy_install cannot simply do.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
kojiro
  • 74,557
  • 19
  • 143
  • 201
  • 1
    As of Xcode 4.3, you now only need to install the smaller Command Line Tools for Xcode if you don't need or want the whole Xcode Development Environment. More details here: http://kennethreitz.com/xcode-gcc-and-homebrew.html – Ned Deily Apr 07 '12 at 15:07
  • Hey thanks for the reply on this. I already had Xcode installed but I had to install the command line tools component. Works fine now. Thanks guys. – harristrader Apr 07 '12 at 16:32