Python jupyter 给出 404:在 WINdows 7 上未找到错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33031069/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jupyter giving 404: Not Found error on WIndows 7
提问by user5331677
I installed anaconda PYTHON 2.7 64bit on Win 7 and then updated using
我在 Win 7 上安装了 anaconda PYTHON 2.7 64bit,然后使用更新
conda update conda
Later installed
后来安装
conda install jupyter
When I tried to run from the same drive on windows using
当我尝试在 Windows 上使用同一个驱动器运行时
jupyter notebook
it launches on Firefox and states
它在 Firefox 上启动并指出
404: Not Found
On the command it says
在命令上它说
Refusing to serve hidden directory via 404 Error
What needs to be done to get it launched?
需要做什么才能启动它?
Update: The anaconda install has a shortcut to run jupyter and it works that way - but gives 404 for "jupyter notebook":
更新:anaconda 安装有一个运行 jupyter 的快捷方式,它以这种方式工作 - 但为“jupyter notebook”提供了 404:
d:\Anaconda\Scripts/ipython-script.py" notebook
回答by Matt
Well as it says it refuses to serve a hidden directory. Try launching it from a non-hidden directory.
正如它所说,它拒绝提供隐藏目录。尝试从非隐藏目录启动它。
回答by Cricboy007
Manually change the directory to Anaconda2. eg. cd Anaconda2 then run - jupyter notebook
手动将目录更改为 Anaconda2。例如。cd Anaconda2 然后运行 - jupyter notebook
回答by David Burton
I found a simple cause of this could be trying to run Jupyter from the root of a drive - running it from C:\ failed. Cricboy007's suggestion to create a folder (no particular name, I called mine notebook) and run Jupyter once you've used cd to make that the working directory worked for me.
我发现一个简单的原因可能是尝试从驱动器的根目录运行 Jupyter - 从 C:\ 运行它失败。Cricboy007 的建议是创建一个文件夹(没有特定名称,我称之为我的笔记本)并在您使用 cd 使工作目录为我工作后运行 Jupyter。
回答by George Davies
For windows 7, anaconda installed by Admin profile. Shortcut created for user(s) had wrong users\folder in "Start in" (working directory) in the start menu folder. Correct the "Start in" entry for the shortcut and it works.
对于 Windows 7,anaconda 由管理员配置文件安装。为用户创建的快捷方式在开始菜单文件夹中的“开始于”(工作目录)中有错误的用户\文件夹。更正快捷方式的“开始于”条目,它可以工作。
Also watch out for users\username\.anaconda\navigator\defaults-1.0.0.ini, with similar path entry.
还要注意用户\用户名\.anaconda\navigator\defaults-1.0.0.ini,具有类似的路径条目。
回答by DVL
I was having the same 404 error and solved it by doing the following:
我遇到了相同的 404 错误并通过执行以下操作解决了它:
right click the jupyter notbook shortcut > properties > change the value of "Start in:" to a path within your Anaconda install (e.g., D:\Anaconda2\Notebooks).
右键单击 jupyter notbook 快捷方式 > 属性 > 将“开始于:”的值更改为 Anaconda 安装中的路径(例如,D:\Anaconda2\Notebooks)。
If you are running from the command line, changing directory to within the anaconda folder should work too
如果您从命令行运行,将目录更改为 anaconda 文件夹也应该可以
回答by Angelique
I had this same problem, as mentioned above the issue was being in the root directory. I just have a bad habit of immediately starting at the root directory when I open CMD. If I leave it in the user folder so it runs as C:\Users[me]>jupyter notebook it works just fine.
我遇到了同样的问题,如上所述,问题出在根目录中。我只是有一个坏习惯,打开CMD就直接从根目录开始。如果我将它留在用户文件夹中,以便它以 C:\Users[me]>jupyter notebook 运行,它就可以正常工作。
回答by Manoj Kumar
What I did:
我做了什么:
sudo chmod -R 777 /path/to/my/folder
and it resolved all the issues.
它解决了所有问题。
回答by Shiva Shrestha
You must first set the environment variables:
C:\Windows\system32>conda create --name test_jupyter
Proceed([y]/n)? y
C:\Windows\system32>activate test_jupyter
(test_jupyter) C:\Windows\system32> jupyter notebook
it will appear in your default browser..
必须先设置环境变量:
C:\Windows\system32>conda create --name test_jupyter
Proceed([y]/n)? y
C:\Windows\system32>activate test_jupyter
(test_jupyter) C:\Windows\system32> jupyter notebook
它会出现在你的默认浏览器中..
回答by Lothar
Had the same issue from command line (Windows 10). Here is what I did to resolve it:
从命令行(Windows 10)有同样的问题。这是我为解决它所做的:
- Fully uninstall Anaconda
- Remove respective PATH / ENVIRONMENT variables
- Reinstall Anaconda (I did just for myself, not for all users)
- Search for DESKTOP application "Jupyter Desktop" and start it
- Voila: Jupyter is up and running!
- 完全卸载 Anaconda
- 删除相应的 PATH / ENVIRONMENT 变量
- 重新安装 Anaconda(我只是为自己做的,不是为所有用户做的)
- 搜索桌面应用程序“Jupyter Desktop”并启动它
- 瞧:Jupyter 启动并运行了!
回答by aiden_k
I had the same problem on Windows 7, python 3 and IE as a default browser. After fighting and changing many setting, i finally changed the default browser to Chrome and the it showed properly the page.
我在作为默认浏览器的 Windows 7、python 3 和 IE 上遇到了同样的问题。在战斗并更改了许多设置之后,我终于将默认浏览器更改为 Chrome,并且它正确显示了页面。