简体   繁体   English

在 python 中导入包时遇到问题

[英]Trouble importing packages in python

I had to reinstall Anaconda and Python in my computer.我不得不在我的电脑上重新安装 Anaconda 和 Python。 After that I have started getting troubles.在那之后,我开始遇到麻烦。 Let me describe what are happening.让我描述一下正在发生的事情。

I installed Anaconda in Program Files.我在 Program Files 中安装了 Anaconda。 When I try accessing anaconda from start menu, I am getting the error.当我尝试从开始菜单访问 anaconda 时,出现错误。

Navigator Error导航器错误

An unexpected error occurred on Navigator start-up Navigator 启动时发生意外错误

After that tried accessing Jupyter from Anaconda Prompt.之后尝试从 Anaconda Prompt 访问 Jupyter。 Got the following error.得到以下错误。

'jupyter' is not recognized as an internal or external command, operable program or batch file.

Installed some packages from Anaconda Prompt and checked that they can be imported inside python from the shell.从 Anaconda 安装了一些包 提示并检查它们是否可以从 shell 导入到 python 中。

蟒蛇提示

After that from start menu I launched jupyter notebook.之后从开始菜单我启动了 jupyter notebook。 Inside Jupyter I again failed to import packages that I was able to access from Python prompt.在 Jupyter 中,我再次无法导入能够从 Python 提示符访问的包。

Jupyterlab 笔记本 I am confused and lost.我感到困惑和迷失。 Would appreciate any help.将不胜感激任何帮助。 I have done multiple install/uninstall.我已经完成了多次安装/卸载。

Did you just update anything?你刚刚更新了什么吗?

Try to import the same thing in Spyder or other python console.尝试在 Spyder 或其他 python 控制台中导入相同的内容。 Check if it is giving detailed traceback for the issue.检查它是否为问题提供了详细的回溯。

Try updating conda, anaconda, anaconda-navigator from anaconda prompt.尝试从 anaconda 提示符更新 conda、anaconda、anaconda-navigator。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM