# Some notes on using IJulia (and nbextensions) as a Python noob

**URL:** <https://discourse.julialang.org/t/some-notes-on-using-ijulia-and-nbextensions-as-a-python-noob/42902>\
**Category:** Specific Domains\
**Tags:** ijulia\
**Created:** [July 11, 2020, 5:27pm UTC](https://discourse.julialang.org/t/some-notes-on-using-ijulia-and-nbextensions-as-a-python-noob/42902 "2020-07-11T17:27:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon67531922](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon67531922](https://discourse.julialang.org/u/anon67531922)\
**Post date:** [July 11, 2020, 5:27pm UTC](https://discourse.julialang.org/t/some-notes-on-using-ijulia-and-nbextensions-as-a-python-noob/42902/1 "2020-07-11T17:27:55Z")

</div>

Back in 2013, I was looking for an open-source alternative to Matlab (my weapon of choice for the 20+ years prior). The obvious candidates were:

- Python
- R
- Octave

I quickly ruled out Octave and didn’t see myself using R so was about to go with Python, when I found this new kid on the block, Julia lang, and there was no looking back ❤😊

Since then, I’ve actively tried to avoid Python (my brain can only handle so much), but occassionally I need something Python related. I know it is mostly because I’m clueless about Python, but every time I wade in those waters, it feels like hell on Earth 😅🔥

Every few months, I feel I learn / struggle enough to get what I need done, but promptly forget and have to repeat the same misery every few months.

These notes are mainly for myself, but might help anyone else in a similar situation 🙂

## Package Manager

I guess Python has a few different package managers, but the ones you (I) probably need to be aware of are `pip` and `conda`. These are typically run from the command line, but after installing IJulia, those commands are not available from the Windows command line.

_Do not be fooled into installing a new Python just so you can access these package managers (like I did!)._

Instead, when you install IJulia, it also installs a dependency: Conda.jl.

If you want to install any Jupyter extensions, you can use Conda for this from Julia. No need to wade into Python waters 🙏

## Registries

Realizing I could use Conda from Julia was a huge relief (I could uninstall the Python I erroneously installed earlier trying to get `pip` to work), but that was only part of the picture. Aparently, Python has something called “channels”, which seem to me very similar to registries in Julia.

Conda has some registries, err… channels, preconfigured, but it didn’t have the one I needed, which was conda-forge.

The solution, in traditional Julia form, was easy peasy:

```julia-auto
julia> Conda.add_channel("conda-forge")

```

From there, I could install the notebook extensions

```julia-auto
julia> Conda.add("jupyter_contrib_nbextensions")

```

So far so good!

## Enabling the Extensions

If anyone has a better way to do this from Julia, please let me know, but you may need to access the `jupyter` command. I don’t know how to access this from Julia, so I had to leave the comfort of Julia and go back to the command line.

However, as noted in the IJulia README:

> Note that if you installed `jupyter` via automated Miniconda installer in `Pkg.add` , above, then `jupyter` may not be in your `PATH` ; type `import Conda; Conda.SCRIPTDIR` in Julia to find out where Conda installed `jupyter` .

I admit, I almost installed Python AGAIN to access this command until I found that note in the README 🙏

After finding the correct path and adding it to my `PATH` environment variable, I was able to access `jupyter` from the command line.

However, to enable to extensions, it turns out I didn’t even need the `jupyter` command. Back in the comfort of Julia, you can run:

```julia-auto
julia> Conda.add("jupyter_nbextensions_configurator")

```

Voila!

Now, if you shut down Jupyter completely and restart IJulia, you should have an “nbextensions config” option under the Edit menu. Alternatively, you can just navigate directly to

[http://localhost:8888/nbextensions](http://localhost:8888/nbextensions)

I hope this helps someone, but it will surely help a future me 🙂
