2017-02-23 66 views
0

我嘗試添加了PYTHONSTARTUP環境變量:如何設置PYTHONSTARTUP腳本的IntelliJ/PyCharm

enter image description here

我也嘗試了自定義啓動腳本:

enter image description here

但更令人驚訝的 - 此沒有工作(npa別名未被識別):

enter image description here

了一下絕望的我甚至嘗試添加到interpreter options

enter image description here

那什麼也沒做:(什麼是真正的Interpreter options應該做..? )

最後,我也看了一下爲蟒蛇的SDK設置 - 並且也沒什麼可有:

enter image description here

那麼接下來我們該如何設定PYTHONSTARTUP腳本?

回答

1

Intellij有任何方法可以做到這一點。相反,我已經添加了以下到腳本

execfile('/Users/boescst/.pythonstartup') 

這是python2的開始。對於python3它有點不同 - 沿着

exec(compile(open('/Users/boescst/.pythonstartup').read))