Search code examples
pythoncmdjupyter-notebookfailed-installationpypy

Issue whilst installing the pypy kernel to jupyter notebook


I am trying to install pypy3 to jupyter notebook but whilst doing it, it gives me an error at the source code bit during the cmd installation. I am on windows 10 64 bit system. Would this bit affect anything, from my backtests of large files the runtime has not been that much better in comparison to python which makes me believe that pypy is not working properly. I am trying to execute the answer to this previous question on stack overflow: enter link description here. even though that source PyPy3/bin/activate bit of the code does not work, the pypy kernel shows up on jupyter notebook.

cmd codes for jupyter notebook installation:

pypy3 -m venv PyPy3
source PyPy3/bin/activate
pypy3 -m pip install ipykernel
ipython kernel install --user --name=PyPy3

cmd results- note that all the other commands worked except for source PyPy3/bin/activate:

C:\Users\maste>pypy3 -m venv PyPy3

C:\Users\maste>source PyPy3/bin/activate
'source' is not recognized as an internal or external command,
operable program or batch file.

Jupyter Notebook:

enter image description here


Solution

  • It looks like you're trying to use source in a command prompt on Windows. That won't work, source is for POSIX environments.

    Instead, try:

    PyPy3\Scripts\activate.bat
    

    Check out the venv documentation for more information. It contains this handy table of commands for activating a virtual environment:

    Activating a virtual environment