virtualenv-pythonw-osx
virtualenv-pythonw-osx copied to clipboard
fails to fix under yosemite
I installed this package using:
.python-env/bin/pip install git+git://github.com/gldnspud/virtualenv-pythonw-osx.git
and then I tried to run the script:
.python-env/bin/fix-osx-virtualenv .python-env/
and got the following errors:
Traceback (most recent call last):
File ".python-env/bin/fix-osx-virtualenv", line 9, in <module>
load_entry_point('fix-osx-virtualenv==0.1', 'console_scripts', 'fix-osx-virtualenv')()
File "/Users/thomas/datasciencefromscratch/.python-env/lib/python2.7/site-packages/install_pythonw/__init__.py", line 120, in run_main
sys.exit(main(sys.argv))
File "/Users/thomas/datasciencefromscratch/.python-env/lib/python2.7/site-packages/install_pythonw/__init__.py", line 93, in main
shutil.copytree(python_app_src, python_app_dest)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
raise Error, errors
shutil.Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info.plist', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Info.plist', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Info.plist'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/MacOS/Python', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/MacOS/Python'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/MacOS', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/MacOS'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/PkgInfo', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/PkgInfo', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/PkgInfo'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources/PythonApplet.icns', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Resources/PythonApplet.icns', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Resources/PythonApplet.icns'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources/PythonInterpreter.icns', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Resources/PythonInterpreter.icns', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Resources/PythonInterpreter.icns'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Resources', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/Resources'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/version.plist', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/version.plist', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents/version.plist'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents', '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app/Contents'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app', '/Users/thomas/datasciencefromscratch/.python-env/Python.app', "[Errno 1] Operation not permitted: '/Users/thomas/datasciencefromscratch/.python-env/Python.app'")]
I noticed that it still copied Python.app over with the contents, including the files that it said the operation was not permitted on, so I modified the script by removing the "already existing Python.app" check at https://github.com/gldnspud/virtualenv-pythonw-osx/blob/629d22cd8af95f2d0959d7174626a3e8103a3ac3/install_pythonw/init.py#L67 and by commenting out the copytree at https://github.com/gldnspud/virtualenv-pythonw-osx/blob/629d22cd8af95f2d0959d7174626a3e8103a3ac3/install_pythonw/init.py#L93
After the modifications, I ran it again and completed and seemed to have fixed my issues.
I ran on El Capitan without any issues.