→ coeric: 補充:直接進到直譯器是正常可import的 05/05 10:34
→ ilms49898723: 你要不要先去確定你跑的python是不是同一隻... 05/05 10:37
→ ilms49898723: 最近怎麼感覺有點常看到這種問題 05/05 10:38
→ coeric: 確定是同一隻沒問題... 05/05 10:51
→ s860134: 我也覺得二樓的想法非常有可能XD 05/05 22:44
→ s860134: 你把這段 code 插到 import pymssql 前面,eclipse和cmd 05/05 22:46
→ s860134: 都執行一次就得惹 05/05 22:46
ppt.cc/bQHMA
ppt.cc/NzmEr
多了樓上建議的這行
似乎是一樣結果..........
※ 編輯: coeric (49.216.18.60), 05/09/2017 11:21:27
→ s860134: 是要你debug, 輸出python執行路徑,不是說加了就能解 05/09 12:28
→ s860134: 根據你執行結果:C:\Python27\ArcGIS10.3\python.exe 05/09 12:45
→ s860134: [上述路徑] -m pip install requests 05/09 12:45
→ s860134: 不確定上面這個路徑是你所謂的 "順利在run" 時所執行的 05/09 12:46
→ s860134: 如果你預期不是這個路徑,那你可以更改環境變數 05/09 12:48
→ s860134: 或是執行 python 時明確指定 pyhton.exe 的位置 05/09 12:48
→ s860134: eg. C:\Python27\python.exe test.py 而非python test.py 05/09 12:49
→ s860134: 你執行 python 時,是藉由 os 的環境變數去指定特定位置 05/09 12:50
→ s860134: python.exe ,對於你有多個 python 版本的環境容易搞混 05/09 12:51
→ coeric: 原電腦環境,是同事遺留下來的 因需要跑arcgis而灌的 05/09 13:30
→ coeric: python,我也懷疑是這個因素,因其他自灌的環境 是先裝 05/09 13:31
→ coeric: python,到目前為止,還沒裝過arcgis,沒出現過這類問題 05/09 13:31