[問題] python問題

看板Linux作者 (.)時間15年前 (2011/04/22 10:55), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我要執行新安裝程式的時候,出現以下的訊息: Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 'import site' failed; use -v for traceback !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! SCRIPTING ENGINE FAILED !!! To inspect the python session as sent to the python interpreter: !!! 1. open a shell !!! 2. linux/cygwin shell: export EMPRO_WRITE_PYTHON_SESSION_TO_FILE=<filename> !!! DOS prompt: set EMPRO_WRITE_PYTHON_SESSION_TO_FILE=<filename> !!! 3. launch the executable from this shell (don't forget the command line arguments ...) !!! 4. Inspect <filename>, which will contain all python commands, !!! and the stderr/stdout messages from the python interpreter !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! terminate called after throwing an instance of 'std::runtime_error' what(): SCRIPTING ENGINE: python call failed 一開始我想說是路徑的問題,所以我就用man python的指令找到下面的資訊: PYTHONHOME Change the location of the standard Python libraries. By default, the libraries are searched in ${prefix}/lib/python<version> and ${exec_prefix}/l ib/python<version>, where ${prefix} and ${exec_prefix} are installation-dependent directories, both defaulting to /usr/local. When $PYTHONHOME is set to a single directory, its value replaces both ${prefix} and ${exec_prefix}. To specify different values for these, set $PYTHONHOME to ${prefix}:${exec_prefix}. 我看/usr/local/lib 跟 /usr/local/lib64裡面都沒有東西。但是/usr/lib跟/usr/lib64 分別有python2.7跟python3.1,我就把這兩個連結到/usr/local/lib跟/usr/local/lib64 裡面去。可是當我再執行程式的時候,還是有一樣的問題。這下我就不知道要怎麼改了。 請問這邊的高手,我應該如何解決這問題呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.168.85.36 我剛剛做了 export PYTHONHOME=/usr/local/lib/python2.7的動作。有進步了一點點 ,剩下這些資訊: 'import site' failed; use -v for traceback !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!! SCRIPTING ENGINE FAILED !!! To inspect the python session as sent to the python interpreter: !!! 1. open a shell !!! 2. linux/cygwin shell: export EMPRO_WRITE_PYTHON_SESSION_TO_FILE=<filename> !!! DOS prompt: set EMPRO_WRITE_PYTHON_SESSION_TO_FILE=<filename> !!! 3. launch the executable from this shell (don't forget the command line arguments ...) !!! 4. Inspect <filename>, which will contain all python commands, !!! and the stderr/stdout messages from the python interpreter !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! terminate called after throwing an instance of 'std::runtime_error' what(): SCRIPTING ENGINE: python call failed 已經終止 (core dumped) 也許問題是出在 'std::runtime_error'。不過我搞不懂這邊是在說什麼。困擾中。。 ※ 編輯: ringballer 來自: 118.168.85.36 (04/22 11:01) ※ 編輯: ringballer 來自: 118.168.85.36 (04/22 11:10) 軟體的路徑本來我是另外設定的。後來我重裝安裝軟體,但路徑設定在它預設 的/usr/local/下面。這樣就OK了。 ※ 編輯: ringballer 來自: 118.168.84.38 (04/25 21:24)
文章代碼(AID): #1DiEuoDJ (Linux)
文章代碼(AID): #1DiEuoDJ (Linux)