Skip to content

Instantly share code, notes, and snippets.

@justquick
Created March 3, 2011 16:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justquick/853003 to your computer and use it in GitHub Desktop.
Save justquick/853003 to your computer and use it in GitHub Desktop.
Jquick7490MLA:force jquick$ mkvirtualenv force
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in <module>
load_entry_point('virtualenv==1.5.1', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.6/site-packages/virtualenv.py", line 558, in main
prompt=options.prompt)
File "/Library/Python/2.6/site-packages/virtualenv.py", line 647, in create_environment
site_packages=site_packages, clear=clear))
File "/Library/Python/2.6/site-packages/virtualenv.py", line 771, in install_python
copy_required_modules(home_dir)
File "/Library/Python/2.6/site-packages/virtualenv.py", line 725, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
File "/Library/Python/2.6/site-packages/virtualenv.py", line 710, in change_prefix
(filename, prefixes)
AssertionError: Filename /Library/Python/2.6/site-packages/readline-6.1.0-py2.6-macosx-10.6-universal.egg/readline.so does not start with any of these prefixes: ['/System/Library/Frameworks/Python.framework/Versions/2.6']
@teoruiz
Copy link

teoruiz commented Mar 7, 2011

Could you fix this? I'm having the same problem.

@justquick
Copy link
Author

Woah, HI. Yea... Not the best solution, but this fixed it

sudo mv /Library/Python/2.6/site-packages/readline* /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/

@teoruiz
Copy link

teoruiz commented Mar 7, 2011

Thanks! It solves it but breaks ipython.

Oh dear God, provide us with better Python packaging on Mac OS X...

@justquick
Copy link
Author

hrm, my ipython seems to be working fine for me. maybe try reinstalling w/ easy_install and if that doesnt work, pip?

@acdha
Copy link

acdha commented Mar 15, 2011

Here's a highly-experimental (i.e. tested once, quickly) patch here:

https://github.com/acdha/virtualenv/commits/mac-site-packages-hack

@fitzgen
Copy link

fitzgen commented Apr 11, 2011

For anyone else who stumbles across this gist when googling:

This issue appears to be fixed in virtualenv's latest source. If I am not mistaken, it uses @acdha's patch.

@acdha
Copy link

acdha commented Apr 12, 2011

fitzgen is right: since we were all at the table at PyCon during the sprints, @carljm merged it after a but of testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment