Py学习  »  tornado

在安装了Tornado 4.5.3之后,如何才能找回我的Python3.6?

Dai dai • 4 年前 • 1031 次点击  

我用 miniconda 运行 Python 3.6 . 一切都很好,直到我无法启动笔记本电脑。错误消息是:

File "/Users/usr/miniconda3/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main


File "/Users/usr/miniconda3/lib/python2.7/site-packages/notebook/notebookapp.py", line 45, in <module>
    ioloop.install()
  File "/Users/usr/miniconda3/lib/python2.7/site-packages/zmq/eventloop/ioloop.py", line 210, in install
    assert (not ioloop.IOLoop.initialized()) or \
AttributeError: type object 'IOLoop' has no attribute 'initialized'

在谷歌搜索之后,我尝试了以下操作:
conda install tornado=4.5.3 但它给出了一个警告信息:

CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.

但我没有仔细阅读,所以我还是表演了。现在我可以打开jupyter笔记本了,但是我的python被降级为 2.7 我怎样才能得到我的 巨蟒3.6 回来?!

提前谢谢你!

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/40665
 
1031 次点击  
文章 [ 1 ]  |  最新文章 4 年前
Dai dai
Reply   •   1 楼
Dai dai    5 年前

我解决了这个问题。感谢@c.nivs和@feelsbadman。以下是我的解决方案:

  • 我通过以下方式检查了python环境: conda env list 发现我有一个基础,2.7和3.6环境同时存在,基础是默认的。
  • 我激活了我的3.6环境 source activate py36
  • 我创建了一个ipython内核 conda install notebook ipykernel 然后 ipython kernel install --user
  • 打开jupyter笔记本,现在有了python 2和python 3内核。

我将尝试从jupyter笔记本中删除python 2,因为我不使用2。

谢谢你的帮助。