0

I'm having a problem running my source blocks in Emacs org mode. I want to just do some literate programming, for which I will need libraries as pandas and matplotlib etc. So I installed a venv and activated it in a shell window within emacs. There I did: pip3 install pandas which worked fine. If I do pip freeze all required libraries are installed in the venv. When I then open an org file and try to import pandas, I get the ImportError: No module named pandas. I have tried restarting everything, killing all the buffers and even activate the virtualenvironment from within a source block.

#+BEGIN_SRC shell
source calls/bin/activate
#+END_SRC

None of that seems to work. It's as if the org file does not recognize the virtualenvironment. All blocks do run in the same session. Does anyone know how to solve this?

PS: Running in a regular python file does work, it's only the org source blocks that don't seem to recognize the virtualenvironment

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.