免责声明:我的Anaconda环境在某一时刻出现了问题,我的最佳猜测只是卸载/重新安装Anaconda,但现在我遇到了以下错误。
我已经成功重新安装了Anaconda,并且可以验证各种模块的存在。但是,当我尝试在Terminal中调用任何给定的模块(例如jupyter notebook
)时,我得到了以下错误的变体:
Traceback (most recent call last):
File "/Users/MYNAME/anaconda3/bin/jupyter", line 7, in <module>
from jupyter_core.command import main
ImportError: No module named jupyter_core.command
我在命令行编程方面没有足够的经验来破译有关该主题的其他帖子...我假设可执行文件路径有问题?如果有帮助,这是conda info
的输出给我:
active environment : None
shell level : 0
user config file : /Users/MYNAME/.condarc
populated config files : /Users/MYNAME/.condarc
conda version : 4.6.8
conda-build version : 3.17.6
python version : 3.7.1.final.0
base environment : /anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/osx-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /anaconda3/pkgs
/Users/MYNAME/.conda/pkgs
envs directories : /anaconda3/envs
/Users/MYNAME/.conda/envs
platform : osx-64
user-agent : conda/4.6.8 requests/2.21.0 CPython/3.7.1
Darwin/18.5.0 OSX/10.14.4
UID:GID : MYUID
netrc file : None
offline mode : False
答案 0 :(得分:0)
只需在特定的conda虚拟环境下重新安装jupyter notebook
。
喜欢:
balabala$ conda activate tensorflow_gpuenv
balabala$ pip install jupyter
(我正在使用ubuntu。)