為什麼 Netbeans 偵測不到 Python?

為什麼 Netbeans 偵測不到 Python?

我在我的系統 14.04 LTS 中使用 Netbeans IDE 8.0。

我已經按照以下步驟在 Netbeans 8.0 中安裝了 Python 插件關聯

我也python-3.4.1.tgz從這裡下載了關聯並按如下方式在終端中安裝它,

tar -xvf Python-3.4.1.tgz
cd Python-3.4.1/
./configure
make
sudo make install
./python

我最後得到的結果是,

arul@arul-Aspire-5740:~/Python-3.4.1$ ./python
Python 3.4.1 (default, Sep 19 2014, 17:14:45) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

我在終端機中使用以下命令確認

python3 -V

得到的回應是,

Python 3.4.1

但是,當我單擊Auto DetectPython Platform Manager (Netbeans IDE 8.0.1) 時,清單中沒有顯示 3.4.1(如下所示)。

在此輸入影像描述

怎麼解決呢?

更新1

我試過,

 arul@arul-Aspire-5740:~$ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; | awk -F: '/x-executable; charset=binary/ {print $1}' | xargs readlink -f | sort -u | xargs -I % sh -c 'echo -n "%: "; % -V'

我得到的結果是,

[sudo] password for arul: 
/home/arul/Python-3.4.1/python: Python 3.4.1
/usr/bin/python2.7: Python 2.7.6
/usr/bin/python3.4: Python 3.4.0
/usr/bin/python3.4m: Python 3.4.0
/usr/local/bin/python3.4: Python 3.4.1
/usr/local/bin/python3.4m: Python 3.4.1

它顯示 3.4.1 但為什麼 Netbeans 檢測不到?

答案1

在“Python Platform Manager”中選擇“New”。
然後它會打開一個對話框。
導航到/usr/local/bin並選擇 python3.4。
至少可以在 Windows 上運行。

如果未出現該對話框,則在新設定檔類型的命令欄位中

/usr/local/bin/python3.4

並在控制台命令中輸入相同的內容。在平台名稱中輸入 Python 3.4.1 這將解決您的問題。

別忘了獎勵賞金!

相關內容