# Cannot run Notebook from within VS Code "Running cells with 'Python 3.8.0 64-bit' requires notebook."

**URL:** <https://discourse.julialang.org/t/cannot-run-notebook-from-within-vs-code-running-cells-with-python-3-8-0-64-bit-requires-notebook/66192>\
**Category:** VS Code\
**Created:** [August 11, 2021, 10:22am UTC](https://discourse.julialang.org/t/cannot-run-notebook-from-within-vs-code-running-cells-with-python-3-8-0-64-bit-requires-notebook/66192 "2021-08-11T10:22:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [August 11, 2021, 10:22am UTC](https://discourse.julialang.org/t/cannot-run-notebook-from-within-vs-code-running-cells-with-python-3-8-0-64-bit-requires-notebook/66192/1 "2021-08-11T10:22:09Z")

</div>

Hi,

I have a VS Code installation where I open a jupyter notebook I have previously created in jupyter lab. When I opened it I needed to install a python extension. I can edit cells, but when I try to run anything I get an error message:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/c/3c0032e173788ad7908588a6d3bb15f34e5e63a2.png)  
When I click “Install” a lot of text comes up in my VS Code terminal, but it seems to fail. It includes a message:

```julia
  ----------------------------------------
  Failed building wheel for pyzmq
  Running setup.py clean for pyzmq
Failed to build pyzmq

```

and ends with

```julia
    ************************************************
    Fatal: Cython-generated file 'zmq/backend/cython/_device.c' not found.
                    Cython >= 0.29 is required to compile pyzmq from a development branch.
                    Please install Cython or download a release package of pyzmq.
    
    
    ----------------------------------------
Command "/usr/bin/python3.8 -u -c "import setuptools, tokenize; __file__ ='/tmp/pip-build-3sj_1tuk/pyzmq/setup.py';f=getattr(tokenize, 'open', open)( __file__ );code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__ , 'exec'))" install --record /tmp/pip-p58xjw9m-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-3sj_1tuk/pyzmq/
Traceback (most recent call last):
  File "/home/username/.vscode/extensions/ms-python.python-2021.8.1105858891/pythonFiles/shell_exec.py", line 26, in <module>
    subprocess.check_call(shell_args, stdout=sys.stdout, stderr=sys.stderr)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3.8', '-m', 'pip', 'install', '-U', 'notebook']' returned non-zero exit status 1.

```

I really don’t know what this means.  
(I could include more if useful, but there’s a lot of it)

Either way, this process seems to fail, and when I try to run something again, the result is similar. Clicking “Change interpreter” gives me various python options, but none seem to help. There is some indicator suggesting I am running the notebook in Julia 1.6.1.

I run VS Code 1.59, and have the Julia, Jupyter, and Python extensions isntalled.

---

<div class="post-metadata">

**Author:** ![banksiaboy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/banksiaboy/32/27032_2.png) [@banksiaboy](https://discourse.julialang.org/u/banksiaboy)\
**Post date:** [August 21, 2021, 1:18am UTC](https://discourse.julialang.org/t/cannot-run-notebook-from-within-vs-code-running-cells-with-python-3-8-0-64-bit-requires-notebook/66192/2 "2021-08-21T01:18:03Z")

</div>

Some suggestions.  
Create a blah.jl file to trigger vs-code to fire-up Julia. It then may know enough to find the Julia kernel for the notebook.

Or, exit vs-code and start the REPL from the command-line like

```julia
PYTHON=“” julia 

```

Which disables your environment’s Python, and causes Julia to install its own conda virtual environment when required by [PyCall](https://github.com/JuliaPy/PyCall.jl)

Activate a local environment from the package manager  
`] activate .`  
Within the REPL package manager

`] add` PyCall, `IJulia`

If you exit the REPL and then, from the command line, start vscode local to your working directory  
`% code .`  
I think it will activate the environment you created above, which should have everything.

This is a bit of a thought experiment, and I’m not at a terminal, so no guarantees

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [August 21, 2021, 11:03am UTC](https://discourse.julialang.org/t/cannot-run-notebook-from-within-vs-code-running-cells-with-python-3-8-0-64-bit-requires-notebook/66192/4 "2021-08-21T11:03:17Z")

</div>

Unfortunately it didn’t work, but thanks for the help still 🙂
