Try   HackMD

如何將 Python 程式碼的環境遷移到其他地方? - Pan

歡迎來到 PyCon TW 2024 共筆

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

共筆入口:https://hackmd.io/@pycontw/2024
手機版請點選上方 按鈕展開議程列表。
Welcome to PyCon TW 2024 Collaborative Writing
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Collaborative Writing Workplace:https://hackmd.io/@pycontw/2024
Using mobile please tap to unfold the agenda.

Collaborative writing start from below
從這裡開始共筆


You can check this presentation at: https://link.pan93.com/pycon2024. The script (Chinese) of the presentation is also included, and feel free to translate it to English or something else if you are not familiar with English.

難題:
沒有dockerdesktop, 網速不夠pip install 該如何轉移環境?

how venv isolation

  • link to system python
  • pyvenv.cfg 虛擬環境的設定檔
  • activate 作用:補上環境變數的PATH以及其他會影響python的變數 (eg. PYTHONHOME)

如果OS 硬體的環境差不多的話,是可以直接複製搬過去(可能需要小改一下 bin/)
like: ubuntu AMD64, linux arm64

有沒有其他可以打包的方式

  • pex
    打包出來的資料還是需要python 執行
  • pyinstaller
  • briefcase

會議錄音、逐字稿、摘要與翻譯:https://s.dwave.cc/jq6WY52

Below is the part that speaker updated the talk/tutorial after speech
講者於演講後有更新或勘誤投影片的部份