- Alright, the notes are as follows, but at the end of the day I think the regular jupyter notebook server in a web browser is the best option. Some VIM shortcuts are used for navigation, the color scheme is better, and it's just less clunky to deal with than pycharm. You just navigate in Terminal to the folder where your python notebook is or where you want to create a new one, and start a server using 'jupyter notebook' and go from there.
But because I spent time on it, here is how to get Pycharm working with jupyter notebooks:
- create a virtual environment using conda: conda create --name test jupyter
- This creates an environment called "test" with the package "jupyter" loaded (you have to provide something, so "jupyter" in this case is a good basic default package to provide). If you created the environment without installing jupyter (like if you said "conda create --name test python" instead), do the following: in Terminal (bash!!), switch to the new environment using conda: source activate test
- Then use conda to install jupyter: conda install jupyter
- I guess you should probably switch back to the root environment: source activate root
- in pycharm, create a new project of Pure Python, and on the screen where you can choose your interpreter, you need to "add local" and navigate to the bin/ subdirectory of the environment you just created, which by default would be located in ~/anaconda/envs/. In [~/anaconda/envs/]bin/, select the python interpreter (python3.5 in my case).
- pycharm will do some stuff either before or when you click the "Create" button.
- in pycharm, in the Project window, you can see under External Libraries that Python 3.5.2 is loaded and the path to the virtual environment is given (~/anaconda/envs/test/bin/python3.5).
- (To keep things organized, I can create the virtual python environment anywhere on my system, i.e. I could create it IN the directory where I plan to keep my jupyter notebook file.)
- I can't figure out how to create a new jupyter file within pycharm - I don't see the option anywhere. So what you do is put the .ipynb file into the Pycharm project folder, and then Pycharm will see the file and you open it from there. Can start with <blankFile>.ipynb. Note this requires creation or existence of a pycharm project, AND a virtual environment! So already it's way more complicated than just using Jupyter notebook web browser.