Closed ClmnsRck closed 4 years ago
@ClmnsRck Looks like Blitz++ has some code generation that relies on Python to run. Since the Spack package for Blitz++ doesn't specify Python as a build-time dependency, it's just using whatever Python is on your system. In the past, the python
command provided Python2 as default. Now some Linux systems (notably Ubuntu) have switched to providing only Python3. In your case, the genstencils.py command is clearly being run by some Python3.
Can you share what OS you're using?
The best solution to this problem is to fix the Blitz++ build so it works with Python2 or Python3. I don't expect that will be very hard.
make[4]: Entering directory '/tmp/ruck/spack-stage/spack-stage-g7c_3kzo/blitz-1.0.1/blitz/generate'
python genstencils.py /home/ruck/spack/var/spack/stage/blitz-1.0.1-55uu5roueihntaq7mwviuhzcci2q7eqk/blitz-1.0.1/blitz/array/stencil-classes.cc
File "genstencils.py", line 9
print "Generating file %s"%sys.argv[1]
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Generating file %s"%sys.argv[1])?
Interestingly, it again was because of my installation of anaconda3 and conda ... it now works, after removing the corresponding lines from the ~/.bashrc it worked
, it again was because of my installation of anaconda3 and conda
Yes, that would do it. BTW... I use Spack for my Python distro. That's in the end easier than maintaining Conda for Python stuff and some other auto-builder (or manual builds) for everything else. Also, throwing random stuff into Spack's environment can mess it up.
I'm glad you found a way beyond your problem. But I'm leaving this Issue open because everyone needs to become Python3 compliant. And that includes Blitz++. We only have 1 year left: https://pythonclock.org/
Hi, is there a way to keep anaconda and still install Blitz?
Yes probably, I'm just not familiar at all with anaconda.
@papadop CMake build should make it easy to specify externally the version of Python to use, I guess a simple change around here should do: https://github.com/blitzpp/blitz/blob/e8ec09f29716ee35cdd3668852704e141f2f7ae3/blitz/array/CMakeLists.txt#L15
?
Fixed in #144 Thanks @papadop
spack-build.txt Here is the output of
spack install blitz
.