2016-11-16 70 views
0

我創建的虛擬環境測試和安裝Spyder在激活的環境 和測試Spyder的權限錯誤

source activate test 

conda info -e 
# conda environments: 
# 
bin      /home/myname/anaconda3/envs/bin 
conda-meta    /home/myname/anaconda3/envs/conda-meta 
include     /home/myname/anaconda3/envs/include 
lib      /home/myname/anaconda3/envs/lib 
share     /home/myname/anaconda3/envs/share 
ssl      /home/myname/anaconda3/envs/ssl 
test     * /home/myname/anaconda3/envs/test 
root      /home/myname/anaconda3 

當我嘗試運行Spyder的,我得到Permission denied錯誤。爲什麼

myname - mycomp - ~/anaconda3/envs/test 
0 # spyder 
Traceback (most recent call last): 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 2998, in main 
    mainwindow = run_spyder(app, options, args) 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 2902, in run_spyder 
    main.setup() 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 1153, in setup 
    self.setup_layout(default=False) 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 1414, in setup_layout 
    self.setup_default_layouts('default', settings) 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/app/mainwindow.py", line 1593, in setup_default_layouts 
    widget.toggle_view(True) 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/plugins/ipythonconsole.py", line 677, in toggle_view 
    self.create_new_client(give_focus=False) 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/plugins/ipythonconsole.py", line 862, in create_new_client 
    connection_file=self._new_connection_file(), 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/site-packages/spyder/plugins/ipythonconsole.py", line 1340, in _new_connection_file 
    os.makedirs(jupyter_runtime_dir()) 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/os.py", line 231, in makedirs 
    makedirs(head, mode, exist_ok) 
    File "/home/myname/anaconda3/envs/test/lib/python3.5/os.py", line 241, in makedirs 
    mkdir(name, mode) 
PermissionError: [Errno 13] Permission denied: '/run/user/myname' 

回答

0

你需要作出這個目錄

/run/user/myname 

寫想不通。 Spyder需要在其中寫入一些文件,所以如果該目錄不可寫,它將會失敗,並顯示錯誤信息。