问题描述
。
无论我如何安装Jupyter(又名IPython),我都会得到一个dud网页。它不会按预期显示标签或菜单。
No matter how I install Jupyter(aka IPython) I get a dud webpage. It does not display tabs or menus as expected.
上面的屏幕截图来自64位Windows Anaconda安装。这是默认安装。安装完毕。没有更改配置。安装后的第一个操作是在开始菜单中选择IPython菜单项。
The screen shot above is from a 64bit Windows Anaconda install. It was a default install. Install finished. No changes to configuration. First action after install was select IPython menu item in start menu.
现在,相信我,我已经尝试了一切。我已经尝试从pip安装IPython我的python2.7安装,anaconda等。无论我如何安装它最终都有同样的问题。我甚至尝试过32位安装等。
Now, trust me, I have tried everything. I have tried installing IPython from pip over top my python2.7 installation, anaconda etc. No matter how I install it ends up with the same problem. I even tried 32bit installs etc.
它似乎不是浏览器,因为IE和Chrome都看到相同的错位显示。
It doesn't appear to be the browser as both IE and Chrome see the same mangled display.
这几乎就像css文件没有被拾取或根本没有。
It is almost like the css files are not being picked up or are not there at all.
我选择允许安装Anaconda更新我的环境变量等,所以爆炸的东西应该找到它自己的位置。
I opted to allow the installation of the Anaconda to update my environment variables etc. so the dang blasted thing should be finding where it has put itself.
可能的原因是什么?请问有什么问题?
What is the likely cause? What is the fix please?
推荐答案
我最近在Windows上遇到过类似的问题。某些程序已覆盖您的mime类型关联。对我来说,Inkscape通过将mime类型设置为application / svg来杀死SVG。
I did have a very similar issue on Windows recently. Some program has overwritten your mime type associations. For me it was Inkscape killing SVG by setting the mime type to application/svg.
在终端上试试这个:
import mimetypes
import mimetypes
mimetypes.guess('file.css')
mimetypes.guess('file.css')
你应该得到text / css 。如果你得到application / css,这很可能是你的问题。我的解决方案:更改mime类型关联。启动regedit并在HKEY_CLASSES_ROOT中搜索application / css。将其替换为text / css。
You should get text/css. If you get application/css this is most likely your problem. My solution: Change back the mime type association. Start regedit and search for application/css in HKEY_CLASSES_ROOT. Replace it with text/css.
请参阅此以供进一步参考。
Please refer to this https://github.com/ipython/ipython/issues/7024 for further reference.
这篇关于Jupyter网页无法正常显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!