5.14.2025

steamloader.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64,arm64', need 'arm64e')), (有效解法)

 問題根源:為什麼 dyld 說「need arm64e」?

  1. 你的 M4 Pro Mac(硬體支援 arm64e 指令集與 Pointer Authentication)啟動的遊戲可執行檔,其 slice 是 arm64e

  2. Steam 在啟動遊戲時,用 DYLD_INSERT_LIBRARIES 強制先載入 steamloader.dylib,但這個檔只含 i386/x86_64/arm64 三個 slice,沒有 arm64e

  3. 如果 SIP(System Integrity Protection)已關閉,dyld 會信守環境變數去插入這個不相容的 dylib,結果就爆出你看到的錯誤。

  4. 啟用 SIP 時,受保護的程式(已開 Hardened Runtime 的簽名 App)會被 dyld 直接忽略 DYLD_INSERT_LIBRARIES,遊戲就能正常跑。Apple Developer


最簡單的修復方式:重新開啟 SIP

適用對象:除非你平常真的需要關掉 SIP(例如裝自訂 kext),否則這是一步到位的解法。

  1. 重開機到「恢復模式」

    • 由關機狀態,長按電源 / Touch ID → 看到「載入啟動選項」。

    • 點「選項 (Options)」→「繼續」。

  2. 進入「工具程式 > 終端機」。

  3. 執行

    bash
    csrutil enable reboot
  4. 開機後在 macOS 再確認:

    bash
    csrutil status # 應顯示 System Integrity Protection status: enabled

    再從 Steam 啟動 CK3 / V3 / Stellaris 就不會再跳 arm64e 錯誤。Steam 討論區與 Paradox 論壇也有人證實「Enable SIP」可解決 Exit Code Null / steamloader 錯誤。

2.12.2025

command not found: poe (問ChatGPT,沒試過)

 command not found: poe

ChatGPT 說:

如果你運行 poetry run poe lint 時出現 command not found: poe,可能有以下幾個原因:


1️⃣ 未安裝 Poe the Poet

poePoe the Poet 提供的命令,請先確認它是否安裝:

✅ 檢查是否已安裝:

sh
poetry show poethepoet

如果沒顯示 poethepoet,你需要安裝它。

📌 安裝 Poe the Poet:

sh
poetry add --dev poethepoet

然後嘗試再次運行 poetry run poe lint


2️⃣ poethepoet 未設置為 Poetry 插件

即使你已經安裝了 poethepoet,Poetry 可能無法識別 poe 命令。嘗試顯式調用:

sh
poetry run python -m poethepoet lint

如果這樣可以運行,表示 poe 命令沒有自動註冊,你可以這樣解決:

sh
poetry self add "poetry-plugin"

然後重新運行 poetry run poe lint


3️⃣ Poe 可能沒有添加到 pyproject.toml

請確保你的 pyproject.toml 文件中包含這個部分:

toml
[tool.poe]

如果沒有,你需要手動添加並配置任務,例如:

toml
[tool.poe.tasks.lint] cmd = "flake8 ."

然後再試試 poetry run poe lint


4️⃣ Poetry 的虛擬環境未激活

如果你在系統的全局環境執行 poetry run poe lint,但 poethepoet 只安裝在 Poetry 虛擬環境內,那麼 poe 可能無法識別。

你可以手動進入 Poetry 的虛擬環境:

sh
poetry shell poe lint

如果這樣可行,說明 poetry run poe lint 可能不是必要的,你可以直接使用 poe lint


🔍 最後檢查

如果還是不行,你可以試試這個:

sh
poetry run poe -l

看看是否有可用的 poe 任務。如果 poetry run poe 都無法執行,那麼問題很可能是 poethepoet 沒有安裝或沒被識別。

試試這些方法,看能不能解決你的問題!🚀

(open-gopro-tutorials-py3.12) pi@a5:~/Downloads/OpenGoPro-main/demos/python/tutorial$ poetry run python -m poethepoet --version
/home/pi/.cache/pypoetry/virtualenvs/open-gopro-tutorials-yv2s6YFQ-py3.12/bin/python: No module named poethepoet
 

Finally using "pip install poethepoet"

It seems works.

12.02.2024

被收簡訊費(IOS 18)

 上個月的電信費帳單,有2元是簡訊費。

就想說如何判斷發送了啥收費簡訊?

首先查ChatGPT, 說IOS 18無法只列出發送的訊息。

所以查看所有訊息,自己送出的訊息是藍色泡泡,

最上面有秀iMessage的,是走網路不另外收費。

最上面秀SMS的,似乎就要收費,

原來邀請家族的人,是要送出SMS簡訊的,

這就是那2元簡訊費。

10.29.2024

OAK-D USB

 OAK-D USB


* Luxonics github

  https://github.com/luxonis/depthai

  https://github.com/luxonis/depthai-ros

  https://github.com/luxonis/depthai-hardware


* Luxonics Docs

SW

 DepthAI Tutorials

   - {https://docs.luxonis.com/software/depthai/getting-started/}[Getting Started]


   sudo wget -qO- https://docs.luxonis.com/install_depthai.sh | bash


   - {https://docs.luxonis.com/software/depthai/manual-install/}[Manual DepthAI installation]

   - {https://docs.luxonis.com/software/depthai/hello-world/}[Hello World]


HW

  -- {https://docs.luxonis.com/hardware/platform/deploy/usb-deployment-guide/}[USB deployment guide]

   - {https://docs.luxonis.com/hardware/platform/deploy/to-rpi/}[Deploy with Raspberry Pi]


* turtlebot4 manual

sensor/OAK-D 

https://turtlebot.github.io/turtlebot4-user-manual/software/sensors.html#oak-d

install/run

   # install

   sudo apt install ros-humble-depthai-ros

   # run

   ros2 launch depthai_examples mobile_publisher.launch.py

   # AI examples are available on the DepthAI github.

   # To view the images from these examples you will need to ssh into the robot with a -X flag:

   ssh -X ubuntu@10.42.0.1

9.12.2024

Python3的py script呼叫其它的py script並執行

Ref: https://stackoverflow.com/questions/1186789/how-to-call-a-script-from-another-script

File test1.py:

print "test1.py"

File service.py:

import subprocess

subprocess.call("test1.py", shell=True)

The advantage to this method is that you don't have to edit an existing Python script to put all its code into a subroutine.

Documentation: Python 2Python 3


(當呼叫的py script是跟使用者有輸入輸出的互動時,

subprocess.call可以使得跟直接執行另一個py一樣)


Ref: https://stackoverflow.com/questions/51928521/eoferror-when-starting-with-subproccess


EOFError when starting with subproccess


You are using subprocess.Popen which is a by default non blocking, piece of code, hence You program cursor moves rather than waiting for the input from the user. But what you need is a code which is blocking your program cursor. subprocess.call exactly does it. It would be waiting for the other command to execute completely.

You need to use subprocess.call to solve your problem. Just change your script2 file with this

import subprocess
p = subprocess.call(["python", "abca.py"])

You can read more about the difference between subprocess.Popen and subprocess.call in this answer. Which describes when to use which command and the difference between them



Important Note:
If your script (a.py) contains a continuous loop waiting for user input
(as shown in your code),
subprocess.run() will not be able to handle it properly
because it doesn't support interactive input.
If you need to execute a script that requires user input,
you might want to use subprocess.Popen() instead,
as it allows more control over the standard input/output.

# Run the Python script a.py
result = subprocess.run(['python3', 'a.py'], capture_output=True, text=True)

# Print the output from the script
print(result.stdout)
print(result.stderr)

# a.py:
while True: print("AAA") print("BBB") print("CCC") user_input = input("Enter something (or 'exit' to quit): ") if user_input.strip() == 'exit': break print(f"You entered: {user_input}")