How do I create a C Notebook in Anaconda Jupyter?
When I ran the following commands. It does not seem to load the install_c_kernel python file.
pip install jupyter-c-kernel
install_c_kernel
jupyter-notebook
What I did to make it work was:
pip install jupyter-c-kernel
kernel.py
:#subprocess.call(['gcc', filepath, '-std=c11', '-rdynamic', '-ldl', '-o', self.master_path])
subprocess.call(['gcc', filepath, '-std=c11', '-o', self.master_path])
...
#cflags = ['-std=c11', '-fPIC', '-shared', '-rdynamic'] + cflags
cflags = ['-std=c11', '-shared'] + cflags
...
#args = ['gcc', source_filename] + cflags + ['-o', binary_filename] + ldflags
args = ['gcc', source_filename] + cflags + ['-o', binary_filename]
\jupyter_c_kernel
directory:..\anaconda3\envs\py39-ijava\Lib\site-packages\jupyter_c_kernel
to:
..\anaconda3\Lib\site-packages\jupyter_c_kernel
install_c_kernel
:..\anaconda3\Lib\site-packages\jupyter_c_kernel\install_c_kernel
Install gcc compiler:
mingw32-base
and mingw32-gcc-g++
-> Installation
-> Apply Changes
-> Installation
-> Quit
Set Environment:
start
-> env
-> Environment Variables
-> Path
-> Edit
-> Set new Path C:\MinGW\bin
check gcc version:
gcc --version
juypter notebook
Please Vote
this answer if it helped you!