rossant / ipymd

Use the IPython notebook as an interactive Markdown editor
BSD 3-Clause "New" or "Revised" License
483 stars 42 forks source link

Fail to run under anaconda #83

Open yuvval opened 7 years ago

yuvval commented 7 years ago

Hi,

Thanks for sharing this package. It looks really useful. I have trouble using it under anaconda. It seems like everything installs correctly, however, when I open a .md file, it opens as a simple text file.

The procedure I followed for adding ipymd to my conda enviroment was:


source activate my_env
pip install ipymd 
jupyter notebook --generate-config
jupyter --config-dir # --> Result with: /home/user/.jupyter
echo c.NotebookApp.contents_manager_class = 'ipymd.IPymdContentsManager' >> /home/user/.jupyter/jupyter_notebook_config.py
echo c.IPymdContentsManager.format = 'markdown' >>  /home/user/jupyter_notebook_config.py 

and then double checking the above line were added correctly to /home/user/jupyter_notebook_config.py

Thanks again!

rossant commented 7 years ago

Hi, I just tried your commands and it worked for me (using latest conda packages and Python 3.6). Have you restarted jupyter? Have you checked that you've installed jupyter in the "my_env" venv and that it's not using a globally-installed jupyter? Otherwise could you remove all comments from the config file and post it here?

Also, can you try it in your root conda environment?

yuvval commented 7 years ago

Thanks for the quick response.

Looking on the jupyter console log, I saw the following error:

  File "/home/user/.jupyter/jupyter_notebook_config.py", line 607, in
c.NotebookApp.contents_manager_class = ipymd.IPymdContentsManager NameError: name 'ipymd' is not defined So I added import ipymd to the config script, and it works now. Any idea why it didn't work with your instructions? Maybe you can add "import pymd" under a troubleshooting section. On Tue, May 23, 2017 at 12:37 PM, Cyrille Rossant wrote: > Hi, I just tried your commands and it worked for me. Have you restarted > jupyter? Have you checked that you've installed jupyter in the "my_env" > venv and that it's not using a globally-installed jupyter? Otherwise could > you remove all comments from the config file and post it here? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > , or mute > the thread > > . >
rossant commented 7 years ago

Ah, there are no quotes around ipymd.IPymdContentsManager, maybe that's the problem. I wonder if the echo command didn't strip out those (I put these lines directly in the config file instead of using the terminal, maybe that was the difference).