ModuleNotFoundError: No module named 'compiler' #5759

Open
sajjad-taheri opened this Issue Jul 10, 2017 · 1 comment

Comments

Projects
None yet
2 participants

After cloning new version of Caffe, I get this error when import caffe:
Traceback (most recent call last):
File "", line 1, in
File "/caffe/python/caffe/init.py", line 9, in
from .net_gen import metalayers, fix_input_dims
File "/caffe/python/caffe/net_gen.py", line 12, in
from compiler.ast import nodes
ModuleNotFoundError: No module named 'compiler'

make all, make test, make runtest and make pycaffe were done without any problem. However, I believe the net_gen.py file uses some deprecated python 2 code.

@wookay wookay added a commit to wookay/caffe that referenced this issue Jul 17, 2017

@wookay wookay Fix net_gen.py for python3 (issue #5759) cf8a23d

wookay commented Jul 17, 2017 edited

I commented out that line and changed to be enclosed within the print statements.
wookay/caffe@cf8a23d

I don't test it with python 2.7, python 3.5.

I'm using the opencl branch with python 3.6.

Python 3.6.1 (default, Apr  4 2017, 09:40:21)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment