cd2025 協同產品設計實習

  • Home
    • SMap
    • reveal
    • blog
  • About
    • Summary
      • Tasks
      • Closing
      • Shooter
    • Product
    • Control
    • CPS
    • AI
    • Project
  • Topics
    • Wink
      • Fossil
    • Topic1
      • w1
      • Portable
      • repo
      • SSH
      • list
      • IPv6
    • Topic2
      • Compile
      • Onshape
    • Topic3
      • Fourbar2
      • boomer
    • Topic4
      • ROS2
  • HW
    • HW1
    • HW2
    • HW3
  • Exam
    • Exam1
    • Exam2
    • Exam3
  • Final
    • Webots
    • Rotate
  • Tutorial
    • Fourbar
      • w10
    • Stage1
      • Tutorial1
      • Tutorial2
    • Stage2
      • Tutorial3
      • Distancesensor
      • Tutorial4
      • Tutorial5
    • Stage3
      • Tutorial6
      • Tutorial7
      • Stream
      • Webots Server
    • Solvespace
      • Learn_Solvs
    • Mecanum
    • Pyslvs-UI
    • PICSimLab
    • Fossil SCM
    • Leo Editor
    • uv
    • Old
  • Brython
w1 << Previous Next >> repo

Portable

以下將說明如何自行在 Windows 操作系統中建立可攜 Python 程式系統.

此作業的目的在展示如何利用既有的 Python 可攜系統建立各版本的 Python 可攜環境.

以下為操作步驟:

  1. 下載 portable_python311.7z, 展開後是一套尚未安裝 pip 的 Python 3.11 可攜程式環境.
  2. 雙點擊 portable_python311 目錄中的 start_ipv6.bat 啟動可攜系統, 在 SciTE 中開啟 Y:\gen_python313.py, 以下拉式功能表 Tools - Go 執行, 便可在 Y:\ 建立 Python313 目錄.
  3. 接著修改 start_ipv6.bat, 利用 Search - Replace, Find 欄位填上 Python311, Replace 欄位填上 Python313 後, 按下 Replace All, 便可將啟動檔中所有 Python311 設定改為 Python313, 另存修改後的檔案為 start_python313.bat.
  4. 接下來以 stop.bat 關閉 start_ipv6.bat 開啟的可攜系統, 改以心建立的 start_python313.bat 開啟可攜環境, 之後在命令列輸入 python, 確認目前的 Python 版本為 3.13.2 後, 利用 Ctrl + z 退出 Python 後, 利用 pip list 確認目前的 Python 3.13.2 系統尚未配置 pip 模組管理工具.
  5. 在命令列中, 以 python get-pip.py 安裝 pip 工具, 完成後, 以 pip list 確認 pip.exe 已經配置完成.
  6. 最後在命令列中, 以 pip install flask flask_cors bs4 lxml pelican markdown 安裝 cmsimde 網際內容管理系統啟動所需的 Python 模組後, 此可攜系統中的 Python 3.13.2 套件已經可以用來維護個人作業倉儲與分組倉儲.
  7. 之後利用新版的 SciTE, Portablegit, PUTTY, ShareX, Wink, Solvespace, Zoomit, ProcessExplorer 以及原有的 tmp 及 home_ipv6, 以新的 start_python313 啟動.

在此有一點必須特別注意, SciTE 中有關使用 Pythonw.exe 解譯程式設定的檔案必須使用:

if PLAT_WIN
	python.command=pythonw.exe
if PLAT_GTK
	python.command=python3
if PLAT_MAC
	python.command=python

也就是使用當下所設定的 pythonw.exe 而非指定到特定舊版本的 pythonw.exe, 例如: Y:\Python310\pythonw.exe


自行製作可攜 Python, 以及配置 pip 的過程如下:


w1 << Previous Next >> repo

Copyright © All rights reserved | This template is made with by Colorlib