初学Pycharm,在导入anaconda总不成功
代码如下
Traceback (most recent call last):
File "C:Program FilesJetBrainsPyCharm 2018.1.4helperspydevpydev_run_in_console.py", line 52, in run_file
Running C:/Users/lenovo/PycharmProjects/untitled/test.py
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:Program FilesJetBrainsPyCharm 2018.1.4helperspydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/lenovo/PycharmProjects/untitled/test.py", line 3
print n
求解答~~~
1.在Pycharm的Files>>Default Settings(或者是Settings)>>Project Interpreter>>Add local 里面添加Anaconda python.exe.
2.也可以用pip配置源anaconda。
conda config --add channels https://mirrors.tuna.tsinghua...
conda config --set show_channel_urls yes