1

For example, I get

#+BEGIN_SRC python :session sdfjkl :results output
  import numpy
#+END_SRC

#+RESULTS:
: Python 3.8.0 (default, Oct 23 2019, 18:51:26) 
: [GCC 9.2.0] on linux
: Type "help", "copyright", "credits" or "license" for more information.

#+BEGIN_SRC python :session main :results output
  import numpy
#+END_SRC

#+RESULTS:
#+begin_example
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/numpy/__init__.py", line 152, in <module>
    from . import random
  File "/usr/lib/python3.8/site-packages/numpy/random/__init__.py", line 181, in <module>
    from . import _pickle
  File "/usr/lib/python3.8/site-packages/numpy/random/_pickle.py", line 1, in <module>
    from .mtrand import RandomState
  File "_bit_generator.pxd", line 14, in init numpy.random.mtrand
  File "_bit_generator.pyx", line 255, in init numpy.random._bit_generator
AttributeError: type object 'numpy.random._bit_generator.SeedSequence' has no attribute '__reduce_cython__'
#+end_example

Somehow, setting the name of the session to be main changes something that makes things not work. Why is this?

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.