ob-ipython
ob-ipython copied to clipboard
Can not create ./obipy-resources/ on windows7
#+RESULTS: :RESULTS: :END:
#+BEGIN_SRC ipython :session :exports both :results raw drawer plt.hist(np.random.randn(2000), bins=200) #+END_SRC
Error: executing Ipython code block... ob-ipython--generate-file-name: Cannot create temporary name for prefix: Permission denied, ./obipy-resources/
i'm also seeing this - i tried editing the path that it is trying to write, and managed to get it to write to a new directory that existed (I assume that the 'permission denied' is code for 'does not exist, and won't let me create').
I managed to get that working but it didn't display correctly inline. That might be a different issue.
as a quick check, I eval'd
(setq ob-ipython-resources-dir "D:/obipy-resources/")
which changed the target dir.
But what I get out i just a link to the file, rather than embedding the file itself:
# Out[12]:
: <matplotlib.axes._subplots.AxesSubplot at 0x13e74e10>
[[file:D:/obipy-resources/10588flH.png]]
I am definitely not an expert though, so this might have been entirely the wrong thing to do!
That's expected. Now you can tell org to display inline images and it'll look like a notebook
hmm, off topic now I guess, but I do have
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
in my init file - shouldn't that cause the files to be displayed?
EDIT: I think it is a separate windows / org compatibility thing. Odd, I thought I had this working on my last comp, but perhaps I didn't
I have the same issue on Windows 10
Using the :ipyfile
header creates the images in buffer, but then I have issues with it only being read only. I believe it has to do with how the temp file names are created. They cause some security issue in windows because they are prefixed with a . or #.
I have just hit this error as well. Was there any resolution for this? Edit: I did the (setq ob-ipython-resources-dir C:/Users/me/scimax/obipy-resources/") and that seemed to fix the problem, or has MS tricked me into dropping my guard? Does this have to be set every time emacs starts? I think for Win10 you have to load every app into the c:/Users/you/ directory. I have had other applications that I had to move to Users/me verses install for everyone to avoid security issues with admin rights.
Hi, I encountered the problem on windows 10. Apparently make-temp-name inside ob-ipython--generate-file-name has the problem.
You might want to check wether you started emacs as "emacs.exe" or "runemacs.exe". For the latter, the problem silently disappeared here for some reasons ...