Installation of Madgraph5 with python 3
Hello,
I am supposed to use Madgrpah5 (+Pythia+Delphes) for my master thesis project. I have a Macbook with python 3.8. I have an issue when running ./bin/mg5_amc:
File "./bin/mg5_amc", line 148, in <module>
import madgraph.
File "/Users/
import madgraph.
File "/Users/
import madgraph.
File "/Users/
import madgraph.
File "/Users/
import madgraph.
File "/Users/
import aloha.create_aloha as create_aloha
File "/Users/
import six.moves.cPickle
ModuleNotFoundE
Do you have any idea of how I can solve this?
Thank you in advance
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Olivier Mattelaer
- Solved:
- 2021-02-16
- Last query:
- 2021-02-16
- Last reply:
- 2021-02-16
I guess your version of the module six is not recent enough.
I would suggest to updated it.
(You can use pip for that)
see
https:/
Cheers,
Olivier
> On 16 Feb 2021, at 20:05, Cesare Cazzaniga <email address hidden> wrote:
>
> No module named 'six.moves.
Cesare Cazzaniga (ccazzaniga) said : | #2 |
Unfortunately it does not solve the problem ... I tried with that solution before .... it gives me the same problem as before ...
What is your version of the six package?
one way to get it is to do
python3
then do
import six
six.__version__
or
[colorordering_
Name: six
Version: 1.15.0
Summary: Python 2 and 3 compatibility utilities
Home-page: https:/
Author: Benjamin Peterson
Author-email: <email address hidden>
License: MIT
Location: /Library/
Requires:
Required-by: astroid, python-dateutil, cycler
Looking at the documentation, they do not indicate a minimal version for the support of that conversion rule.
so i do not know what is the minimal version needed
Cheers,
Olivier
Cesare Cazzaniga (ccazzaniga) said : | #4 |
yes, doing ... pip3 show six ... I get your same output...
Then I'm not sure to understand. my best guess is that you have another file six.py which conflicts...
Can you do the equivalent of the following:
[HEPToolsInstal
Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import six
>>> six.__version__
'1.15.0'
>>> import six.moves.cPickle
>>> six.__file__
'/Users/
This will indicate us if you have another file which blocks the pip file or not.
Cheers,
Olivier
Cesare Cazzaniga (ccazzaniga) said : | #6 |
yes, indeed there is a conflict with an other six from a ROOT installation:
import six
>>> six.__version__
'1.4.1'
>>> import six.moves.cPickle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundE
>>> six.__file__
'/Users/
So, what do you suggest to do?
Hi,
I would test to do
mv /Users/
rm /Users/
This should fix the problem on this side but maybe not the one for root (but I guess it should be fine).
Another option is to play with the PYTHONPATH, but you might get the same issue...
A third solution is likely virtual environment but I have never play with that.
Cheers,
Olivier
Cesare Cazzaniga (ccazzaniga) said : | #8 |
Thank you,
I have solved with your suggestion .