Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rivet unit test fails with python3 #28919

Open
silviodonato opened this issue Feb 11, 2020 · 12 comments
Open

Rivet unit test fails with python3 #28919

silviodonato opened this issue Feb 11, 2020 · 12 comments

Comments

@silviodonato
Copy link
Contributor

The new rivet tests (#28873) revealed an incompatibility of rivet with Python3

===== Test "test-rivet-list" ====
The rivet Python module could not be loaded: is your PYTHONPATH set correctly?

---> test test-rivet-list had ERRORS
 
^^^^ End Test test-rivet-list ^^^^

Indeed, the command rivet --list-analyses gives the error The rivet Python module could not be loaded: is your PYTHONPATH set correctly?.

This error seems rather similar to issue #28837, solved with PR #28842.
The probkem is that Rivet is an external package, perhaps we need to use a different version for python3.
Do you have any idea about how to solve this issue?

@silviodonato
Copy link
Contributor Author

assign core-software

@silviodonato
Copy link
Contributor Author

assign generators

@cmsbuild
Copy link
Contributor

New categories assigned: generators

@alberto-sanchez,@SiewYan,@qliphy,@efeyazgan,@mkirsano,@agrohsje you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

A new Issue was created by @silviodonato Silvio Donato.

@Dr15Jones, @smuzaffar, @silviodonato, @makortel, @davidlange6, @fabiocos can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor

assign core

@cmsbuild
Copy link
Contributor

New categories assigned: core

@Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@qliphy
Copy link
Contributor

qliphy commented Feb 11, 2020

adding @intrepid42 @xjanssen

@mseidel42
Copy link
Contributor

mseidel42 commented Feb 11, 2020

Hi, if python3 is configured as default it should be picked up when Rivet is compiled. See some ./configure output from my local system:

checking for python... /usr/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '2.7.3'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/usr/include/python3.7m
checking for Python library path... -L/usr/lib64 -lpython3.7m
checking for Python site-packages path... /usr/lib/python3.7/site-packages
checking python extra libraries... 
checking python extra linking flags... 
checking consistency of all components of python development environment... yes
checking for python version... 3.7
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python3.7/site-packages
% python
Python 3.7.6 (default, Jan 30 2020, 09:44:41) 
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import rivet
>>> rivet.__version__
'3.1.0'

(same applies to yoda)

@silviodonato
Copy link
Contributor Author

Update of the error (CMSSW_11_2_PY3_X_2020-11-11-2300)

===== Test "test-rivet-list" ====
The rivet Python module could not be loaded: are your PYTHONPATH and (DY)LD_LIBRARY_PATH set correctly?
Try running 'python -c "import rivet"' at the command line (or "import rivet" in a Python REPL)
Full error message:
No module named 'commands'

---> test test-rivet-list had ERRORS

@mseidel42
Copy link
Contributor

Hi Fabio,

I think @smuzaffar has solved the problem for YODA: https://github.com/cms-sw/cmsdist/blame/IB/CMSSW_11_2_X/py3/yoda.spec#L19 (see output below)

Would the same work for Rivet?

% python
Python 3.8.2 (default, May  7 2020, 20:12:14) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yoda
Warning in <TInterpreter::ReadRootmapFile>: typedef  HepMC::FourVector found in libHepMC3rootIO.so  is already in libSimDataFormatsGeneratorProducts.so 
>>> yoda.__version__
b'1.8.3'
>>> yoda.__path__
['/cvmfs/cms-ib.cern.ch/nweek-02654/slc7_amd64_gcc820/external/yoda/1.8.3-ddf25d9922c60df7fe0fdf63f8d8e5b0/lib/python3.8/site-packages/yoda']
>>> import rivet
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/cvmfs/cms-ib.cern.ch/nweek-02654/slc7_amd64_gcc820/lcg/root/6.22.03-694cb0996bc307ad6096a3730e294a41/lib/ROOT/_facade.py", line 121, in _importhook
    return _orig_ihook(name, *args, **kwds)
ModuleNotFoundError: No module named 'rivet'

@makortel
Copy link
Contributor

I guess this issue has been solved?

@cmsbuild
Copy link
Contributor

cms-bot internal usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants