看板 Python 關於我們 聯絡資訊
※ 引述《gecer (gecer)》之銘言: : 如題 小弟因業務因素 電腦無網路 若要安裝模組通常可以下載模組安裝 但是有些模組 : dependent on 其他模組 安裝過程中會自動上網去尋找其他模組 請問是否可以在其他有 : 網路電腦安裝後再將folder 搬到無網路的電腦安裝?小弟電腦是windows 64bit 就正常的環境設定而言, 下面的步驟可以保證抓到所有需要的套件 1. 建立新的虛擬環境 2. 在裡面安裝所有你需要的套件 3. 確定你的程式在這個新虛擬環境內可以正確執行 4. pip freeze > requirements.txt 5. pip download -r requirements.txt 這樣應該會把所有你在這個環境內安裝的套件都下載到目前目錄 全部搬到新電腦一個一個 pip install <套件包路徑> 即可 不過如果你的套件有 depend on 非 Python 元件那就比較麻煩 只能一個一個特案處理了, 遇到再說 -- Les grandes et les meilleurs tone from "Zadok the Priest" Eine grosse stattliche Veranstaltung by F. Handel THE MAIN EVENT! These are the men Sie sind die Besten "Champions League" by Tony Britten THESE ARE THE CHAMPIONS! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 218.161.19.12 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1502725567.A.37B.html
Neisseria: 推推 08/16 10:15