Is transformers the newer version? (as the name suggests, since pytorch_transformers was used upto version 1.something)
If so, did you install both pytorch_transformers and transformers? I’m using the former because of Python 2.7 and my codebase worked until recently (I checked only a few days ago and noticed that XLM creates the error mentioned in the original post). If I install also transformers, I get a different error; if I do not install transformers, then “from transformers import …” does not work. How were you able to resolve this?
Edit: look at the resolution here 5 if you need to use Python 2 and pytorch_transformers <= 1.2.0