0

I have newly installed Anaconda custom version with Python 3.7 on Windows 10. I have Anaconda3, Anaconda3\Scripts, and Anaconda3\Library\bin directories in my PATH.

conda list anaconda$
# packages in environment at C:\Users\Evgeni\Anaconda3:
#
# Name                    Version                   Build  Channel
anaconda                  custom                   py37_0

What I did:

conda create -n py27 python=2.7
activate py27
conda install ipykernel
source deactivate

Then I started Jupyter Notebook and there was no Python 2.7 kernel available. I wanted to see the list of kernels, but got an error:

jupyter kernelspec

    Traceback (most recent call last):
  File "C:\Users\Evgeni\Anaconda3\Scripts\jupyter-kernelspec-script.py", line 6, in <module>
    from jupyter_client.kernelspecapp import KernelSpecApp
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
    from .connect import *
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 281, in <module>
    'hb' : zmq.REQ,
AttributeError: module 'zmq' has no attribute 'REQ'

UPD

conda install jupyter

    Collecting package metadata: done
Solving environment: /
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::ipykernel==5.1.0=py37h39e3cac_0
  - defaults/win-64::ipywidgets==7.4.2=py37_0
  - defaults/win-64::jupyter==1.0.0=py37_7
  - defaults/win-64::jupyterlab==0.35.4=py37hf63ae98_0
  - defaults/win-64::jupyterlab_server==0.2.0=py37_0
  - defaults/win-64::jupyter_client==5.2.4=py37_0
  - defaults/win-64::jupyter_console==6.0.0=py37_0
  - defaults/win-64::notebook==5.7.8=py37_0
  - defaults/noarch::qtconsole==4.4.4=py_0
  - defaults/win-64::spyder==3.3.4=py37_0
  - defaults/win-64::spyder-kernels==0.4.4=py37_0
  - defaults/win-64::widgetsnbextension==3.4.2=py37_0
  - defaults/win-64::_ipyw_jlab_nb_ext_conf==0.1.0=py37_0
done

## Package Plan ##

  environment location: C:\Users\Evgeni\Anaconda3

  added / updated specs:
    - jupyter


The following NEW packages will be INSTALLED:

  pyzmq              pkgs/main/win-64::pyzmq-18.0.0-py37ha925a31_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Then

jupyter kernelspec

Got another error:

_cffi_ext.c
C:\Users\Evgeni\Anaconda3\lib\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(213): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
Traceback (most recent call last):
  File "C:\Users\Evgeni\Anaconda3\Scripts\jupyter-kernelspec-script.py", line 6, in <module>
    from jupyter_client.kernelspecapp import KernelSpecApp
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
    from .connect import *
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 23, in <module>
    import zmq
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
    from zmq import backend
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "C:\Users\Evgeni\Anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.

How to have Python 2.7 kernel installed and available? Any advice is appreciated.

2
  • have you tried installing jupyter in your new anaconda environment? i.e. conda install jupyter
    – Randomhero
    Commented May 16, 2019 at 8:55
  • @Randomhero Yes, see update please. Commented May 17, 2019 at 3:29

0

You must log in to answer this question.

Browse other questions tagged .