cannot create system image
To counter the problem of statically linked Python, I tried to compile the custom system image, however, got this just now
Fatal Python error: initsite: Failed to import the site module
Traceback (most recent call last):
File "/home/redbq/Software/Anaconda/lib/python3.7/site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "/home/redbq/Software/Anaconda/lib/python3.7/importlib/util.py", line 14, in <module>
from contextlib import contextmanager
File "/home/redbq/Software/Anaconda/lib/python3.7/contextlib.py", line 5, in <module>
from collections import deque
File "/home/redbq/Software/Anaconda/lib/python3.7/collections/__init__.py", line 24, in <module>
import heapq as _heapq
File "/home/redbq/Software/Anaconda/lib/python3.7/heapq.py", line 587, in <module>
from _heapq import *
SystemError: initialization of _heapq did not return an extension module
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/redbq/Software/Anaconda/lib/python3.7/site.py", line 586, in <module>
main()
File "/home/redbq/Software/Anaconda/lib/python3.7/site.py", line 573, in main
known_paths = addsitepackages(known_paths)
File "/home/redbq/Software/Anaconda/lib/python3.7/site.py", line 349, in addsitepackages
addsitedir(sitedir, known_paths)
File "/home/redbq/Software/Anaconda/lib/python3.7/site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "/home/redbq/Software/Anaconda/lib/python3.7/site.py", line 178, in addpackage
import traceback
File "/home/redbq/Software/Anaconda/lib/python3.7/traceback.py", line 3, in <module>
import collections
File "/home/redbq/Software/Anaconda/lib/python3.7/collections/__init__.py", line 24, in <module>
import heapq as _heapq
File "/home/redbq/Software/Anaconda/lib/python3.7/heapq.py", line 587, in <module>
from _heapq import *
SystemError: initialization of _heapq did not return an extension module
This seems to be the issue with incompatible precompilation files. The easiest workaround at the moment is to remove PyCall's precompilation cache. PyJulia can probably do something clever to avoid this, though.
The easiest workaround at the moment is to remove PyCall's precompilation cache.
More precisely something like rm -r ~/.julia/compiled/v1.$x/PyCall with appropriate $x.
ref #325
I am having exactly the same problem. Removed the precompilation files as suggested above, but this did not help. Also removed the whole ~/.julia and started from scratch, but got the same error.
Besides, this message is the same as that you start julia via ctypes and libjulua and eval using PyCall in this julia session.
Works now for me in version 0.5.0, problem was in former version.