我使用 textmate 在乳膠中制作 pdf 檔案。macOS Monterey 12.3 版本更新后,python 的最小版本(/usr/bin/python)消失了:現在編譯不作業了。我嘗試通過 /usr/bin/python3 更改 textmate 的檔案 /usr/bin/python (我只有這個 python 檔案夾),但這總是不起作用。
錯誤說我改變編譯命令是這樣的:
#!/usr/bin/env ruby18
# coding: utf-8
require ENV["TM_SUPPORT_PATH"] "/lib/tm/process"
require ENV["TM_SUPPORT_PATH"] "/lib/tm/htmloutput"
require ENV["TM_SUPPORT_PATH"] "/lib/tm/save_current_document"
# To enable the typesetting of unsaved documents, you must change the “Save” setting of
# this command to “Current File” and add the variable TM_LATEX_AUTOSAVE to TextMate's
# Shell Variables preferences. Be warned that your document must be encoded as UTF-8 if
# you exercise this option — becauseTextMate.save_current_document cannot know the file
# encoding you prefer.
TextMate.save_current_document unless ENV["TM_LATEX_AUTOSAVE"].nil?
texmate = ENV["TM_BUNDLE_SUPPORT"] "/bin/texmate.py"
engine_version = TextMate::Process.run(texmate, "version")
TextMate::HTMLOutput.show(:title => "Typesetting “#{ENV["TM_DISPLAYNAME"] || File.basename(ENV["TM_FILEPATH"])}”…", :sub_title => engine_version) do |io|
TextMate::Process.run(texmate, 'latex', :interactive_input => false) do |line|
io << line
end
end
::Process.exit($?.exitstatus || 0) # exitstatus is nil if our process is prematurely terminated (SIGINT)
非常感謝您的幫助。PS : 用 texshop 編譯作業,我不認為這是一個乳膠問題
uj5u.com熱心網友回復:
TextMate 的 LaTeX 捆綁包沒有及時更新到 MacOS 12.3 的發布。您可以按如下方式修復它:
- 下載并安裝 Python 3 ( https://www.python.org/downloads/ )
- /usr/bin/python3 -m pip install pyobjc --user
- cd ~/Library/Application\ Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin
- 在所有 .py 檔案(configure.py、btexdoc.py、texmate.py、texparser.py)的標題中將“python”更改為“python3”
uj5u.com熱心網友回復:
我剛剛找到以下頁面: https ://www.heise.de/news/macOS-12-3-Apple-wirft-Python-raus-6341999.html 它告訴我 Apple 不支持 Python(以及其他一些腳本諸如 Perl 之類的語言)。他們支持的最后一個版本是 Python 2.7。開發人員應自行安裝(并維護)Python 3。Python頁面告訴了完全相同的事情:
https://docs.python-guide.org/starting/install3/osx/
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/445709.html
