I am getting error in LaTex: Failure running “Typeset & View (PDF)”
/Users/riki/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/tm/process.rb:121: warning: Insecure world writable dir /Users/riki/Library/Application Support in PATH, mode 040706 Traceback (most recent call last): File "/Users/riki/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin/texmate.py", line 65, in from tmprefs import Preferences File "/Users/msheets/Library/Application Support/Avian/Bundles/latex.tmbundle/Support/bin/tmprefs.py", line 3, in from __future__ import print_function ImportError: No module named Foundation
Installed Python version: Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information.
and
Python 3.4.3 |Anaconda 2.3.0 (x86_64)| (default, Mar 6 2015, 12:07:41) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information.
Installed Ruby version: ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
Best Regards, Riki
Hi Riki,
On 16 Sep 2015, at 5:31 , riki riki80@rediffmail.com wrote:
I am getting error in LaTex: Failure running “Typeset & View (PDF)”
/Users/riki/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/tm/process.rb:121: warning: Insecure world writable dir /Users/riki/Library/Application Support in PATH, mode 040706 Traceback (most recent call last): File "/Users/riki/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin/texmate.py", line 65, in from tmprefs import Preferences File "/Users/msheets/Library/Application Support/Avian/Bundles/latex.tmbundle/Support/bin/tmprefs.py", line 3, in from __future__ import print_function ImportError: No module named Foundation
it looks like “PyObjC” is missing for the Python executable at `/usr/bin/python`. You can check this via the following steps:
1. Open Terminal 2. Enter the following text:
/usr/bin/python
3. Enter the following text:
import Foundation
The last step should fail according to your description. Did you by any chance install a custom version of Python and link it to /usr/bin?
If this is the case, then installing `PyObjC` for this custom — non Apple — version of Python should fix your issue. The usual command for this process is something like `pip install PyObjC`.
Installed Python version: Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information.
and
Python 3.4.3 |Anaconda 2.3.0 (x86_64)| (default, Mar 6 2015, 12:07:41) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information.
Installed Ruby version: ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
Best Regards, Riki
Get your own FREE website, FREE domain & FREE mobile app with Company email. Know More >
Kind regards, René
On 16 Sep 2015, at 5:31, riki wrote:
warning: Insecure world writable dir /Users/riki/Library/Application Support in PATH, mode 040706
For the actual error, see René’s reply, but for the warning above, you can reset the above folder to its default permission by running this in a terminal:
chmod 700 ~/Library/Application\ Support
Many thanks to René & Allan for your kind help!!
The warning has been suppressed as per Allan's advice. I installed `pip install PyObjC` and installation directory is 'anaconda' in my home directory. I have Python 3.4 and still I am getting the same error.
Earlier I had many files in '/Library/Python/2.7/site-packages' directory and I think those were come by macport installation. I have removed all macport files including '/opt/local' directory. Now the '/Library/Python/2.7/site-packages' directory is empty. I checked the uninstallation script file, there are many files having name pyobjc: yes | pip uninstall pyobjc-core==2.5.1 yes | pip uninstall pyobjc-framework-Accounts==2.5.1 yes | pip uninstall pyobjc-framework-AddressBook==2.5.1 yes | pip uninstall pyobjc-framework-AppleScriptKit==2.5.1 yes | pip uninstall pyobjc-framework-AppleScriptObjC==2.5.1 yes | pip uninstall pyobjc-framework-Automator==2.5.1 yes | pip uninstall pyobjc-framework-CFNetwork==2.5.1 yes | pip uninstall pyobjc-framework-Cocoa==2.5.1 yes | pip uninstall pyobjc-framework-Collaboration==2.5.1 yes | pip uninstall pyobjc-framework-CoreData==2.5.1 yes | pip uninstall pyobjc-framework-CoreLocation==2.5.1 yes | pip uninstall pyobjc-framework-CoreText==2.5.1 yes | pip uninstall pyobjc-framework-DictionaryServices==2.5.1 yes | pip uninstall pyobjc-framework-EventKit==2.5.1 yes | pip uninstall pyobjc-framework-ExceptionHandling==2.5.1 yes | pip uninstall pyobjc-framework-FSEvents==2.5.1 yes | pip uninstall pyobjc-framework-InputMethodKit==2.5.1 yes | pip uninstall pyobjc-framework-InstallerPlugins==2.5.1 yes | pip uninstall pyobjc-framework-InstantMessage==2.5.1 yes | pip uninstall pyobjc-framework-LatentSemanticMapping==2.5.1 yes | pip uninstall pyobjc-framework-LaunchServices==2.5.1 yes | pip uninstall pyobjc-framework-Message==2.5.1 yes | pip uninstall pyobjc-framework-OpenDirectory==2.5.1 yes | pip uninstall pyobjc-framework-PreferencePanes==2.5.1 yes | pip uninstall pyobjc-framework-PubSub==2.5.1 yes | pip uninstall pyobjc-framework-QTKit==2.5.1 yes | pip uninstall pyobjc-framework-Quartz==2.5.1 yes | pip uninstall pyobjc-framework-ScreenSaver==2.5.1 yes | pip uninstall pyobjc-framework-ScriptingBridge==2.5.1 yes | pip uninstall pyobjc-framework-SearchKit==2.5.1 yes | pip uninstall pyobjc-framework-ServiceManagement==2.5.1 yes | pip uninstall pyobjc-framework-Social==2.5.1 yes | pip uninstall pyobjc-framework-SyncServices==2.5.1 yes | pip uninstall pyobjc-framework-SystemConfiguration==2.5.1 yes | pip uninstall pyobjc-framework-WebKit==2.5.1
I also tried by Apple's preinstalled 'PyObjC'. I exported python 2.6 system directory in my bash profile. $ export PYTHONPATH="/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/" $ python Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import Foundation
It means python recognizes “PyObjC”. Here again I am getting the same error in TexMate. I exported python 2.6 because some 'PyObC' files are missing in python 2.7 system directory.
Best Regards, Riki
Hi Riki,
On 16 Sep 2015, at 11:16 , riki riki80@rediffmail.com wrote:
Many thanks to René & Allan for your kind help!!
The warning has been suppressed as per Allan's advice. I installed `pip install PyObjC` and installation directory is 'anaconda' in my home directory. I have Python 3.4 and still I am getting the same error.
Earlier I had many files in '/Library/Python/2.7/site-packages' directory and I think those were come by macport installation. I have removed all macport files including '/opt/local' directory. Now the '/Library/Python/2.7/site-packages' directory is empty. I checked the uninstallation script file, there are many files having name pyobjc: yes | pip uninstall pyobjc-core==2.5.1 yes | pip uninstall pyobjc-framework-Accounts==2.5.1 yes | pip uninstall pyobjc-framework-AddressBook==2.5.1 yes | pip uninstall pyobjc-framework-AppleScriptKit==2.5.1 yes | pip uninstall pyobjc-framework-AppleScriptObjC==2.5.1 yes | pip uninstall pyobjc-framework-Automator==2.5.1 yes | pip uninstall pyobjc-framework-CFNetwork==2.5.1 yes | pip uninstall pyobjc-framework-Cocoa==2.5.1 yes | pip uninstall pyobjc-framework-Collaboration==2.5.1 yes | pip uninstall pyobjc-framework-CoreData==2.5.1 yes | pip uninstall pyobjc-framework-CoreLocation==2.5.1 yes | pip uninstall pyobjc-framework-CoreText==2.5.1 yes | pip uninstall pyobjc-framework-DictionaryServices==2.5.1 yes | pip uninstall pyobjc-framework-EventKit==2.5.1 yes | pip uninstall pyobjc-framework-ExceptionHandling==2.5.1 yes | pip uninstall pyobjc-framework-FSEvents==2.5.1 yes | pip uninstall pyobjc-framework-InputMethodKit==2.5.1 yes | pip uninstall pyobjc-framework-InstallerPlugins==2.5.1 yes | pip uninstall pyobjc-framework-InstantMessage==2.5.1 yes | pip uninstall pyobjc-framework-LatentSemanticMapping==2.5.1 yes | pip uninstall pyobjc-framework-LaunchServices==2.5.1 yes | pip uninstall pyobjc-framework-Message==2.5.1 yes | pip uninstall pyobjc-framework-OpenDirectory==2.5.1 yes | pip uninstall pyobjc-framework-PreferencePanes==2.5.1 yes | pip uninstall pyobjc-framework-PubSub==2.5.1 yes | pip uninstall pyobjc-framework-QTKit==2.5.1 yes | pip uninstall pyobjc-framework-Quartz==2.5.1 yes | pip uninstall pyobjc-framework-ScreenSaver==2.5.1 yes | pip uninstall pyobjc-framework-ScriptingBridge==2.5.1 yes | pip uninstall pyobjc-framework-SearchKit==2.5.1 yes | pip uninstall pyobjc-framework-ServiceManagement==2.5.1 yes | pip uninstall pyobjc-framework-Social==2.5.1 yes | pip uninstall pyobjc-framework-SyncServices==2.5.1 yes | pip uninstall pyobjc-framework-SystemConfiguration==2.5.1 yes | pip uninstall pyobjc-framework-WebKit==2.5.1
I also tried by Apple's preinstalled 'PyObjC'. I exported python 2.6 system directory in my bash profile. $ export PYTHONPATH="/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/"
as far as I know TextMate does not read environment variables that you export via your bash profile. If you want to use environment variables inside TextMate, then you can for example set them via “TextMate→Preferences…→Variables”.
$ python Python 2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import Foundation
It means python recognizes “PyObjC”. Here again I am getting the same error in TexMate. I exported python 2.6 because some 'PyObC' files are missing in python 2.7 system directory.
“Typeset & View (PDF)” always uses `/usr/bin/python` [1]. The reason for this is simple. `/usr/bin/python` is — by default — the location of the Python interpreter supplied by Apple. This means we can make some assumptions:
• The interpreter version is at least 2.7 (We do not support Python 2.6 [2]) • „PyObjC” and other standard libraries are installed
[1]: https://github.com/textmate/latex.tmbundle/blob/master/Support/bin/texmate.p... [2]: http://textmate.1073791.n5.nabble.com/Failure-running-Typeset-amp-View-PDF-t...
You need to make sure that “PyObjC” is installed for whatever version of Python `/usr/bin/python` links to. Hope this helps.
Best Regards, Riki
Kind regards, René
Thanks a lot René for your kind positive input. Your solution actually works!!
I just did two things in Shell Variables: (1) Define variable name 'TM_PYTHON' and its value '/usr/bin/python'. As you said it is assumed and so not necessary. But to be explicit I wrote it. This python version is 2.7.10 (default, Jul 14 2015, 19:46:27). (2) Define variable name 'PYTHONPATH' and its value '$PATH:/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/'. It is crucially important. The version 2.7 is not working here at present.
Best Regards, Riki