Message: Re: Problem Installing python bindings Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Problem Installing python bindings 

Forum: Installation and Configuration
Re: None Problem Installing python bindings (Jan Weidner)
Date: 26 Apr, 2017
From: Arun Persaud <Arun Persaud>

Ran into the same problem, I edited all cmake_install.cmake files in the build directory and removed the section at the and that installed pyc and pyo files.

I also had to change the following the main CMakeList.txt file

+#find_package(PythonInterp REQUIRED)
+#find_package(PythonLibs REQUIRED)
+SET(PYTHON_INCLUDE_PATH /usr/include/python3.6m)
+SET(PYTHON_LIBRARIES /usr/lib64/libpython3.6m.so)
+SET(PYTHON_EXECUTABLE /usr/bin/python3.6m)
+SET(PYTHON_VERSION_STRING 3.6.1)
+SET(PYTHON_VERSION_MAJOR 3)
+SET(PYTHON_VERSION_MINOR 6)
+SET(PYTHON_VERSION_PATCH 1)
+SET(PYTHON_INCLUDE_DIR  /usr/include/python3.6m)
 find_package(Boost)
+find_package(Boost 1.63 COMPONENTS python-py3)

and change all boost_python strings into the -py3 version of it.

e.g. - ${GEANT4_LIBRARIES_WITH_VIS} boost_python + ${GEANT4_LIBRARIES_WITH_VIS} boost_python-py3

this made 'make' and 'make install' run smoothly, but now I'm stuck with the following error when I try to load the module:

In [1]: import Geant4

*************************************************************
 Geant4 version Name: geant4-10-03-patch-01    (24-February-2017)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-1-61192f1addc7> in <module>() ----> 1 import Geant4

/home/arun/src/Prog/geant4/environments/g4py/lib64/Geant4/__init__.py in <module>()
     89 
     90 # gLossTableManager
---> 91 gLossTableManager = G4LossTableManager.Instance()
     92 
     93 # gProductionCutsTable

NameError: name 'G4LossTableManager' is not defined

not sure how to fix this though :(

Arun

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 More: Re: Problem Installing python bindings   (Arun Persaud - 26 Apr, 2017)
(_ None: Re: Problem Installing python bindings   (Brian Fisher - Dec 05, 13:51)
(_ None: Re: Problem Installing python bindings   (Arun Persaud - Dec 05, 14:32)
 Add Message Add Message
to: "Re: Problem Installing python bindings"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]