_pickle.PicklingError: Can't pickle <function Field.<lambda>: attribute lookup Field.<lambda> on torchtext.data.field failed

When I want to preprocess, I get _pickle.PicklingError: Can’t pickle <function Field. at 0x7f7ecf70cb70>: attribute lookup Field. on torchtext.data.field failed.

When I try pip install torchtext, I get requirement already satisfied.
Working in Python 3.6.3.
I just updated my opennmt-py with git pull origin master

Can anyone help me? tx.

what version of torchtext do you see installed ? (pip3 list)

torchtext (0.3.1).
I see that there is a 0.4 version available – should I upgrade ?

Yes, see the requirements.txt file:

when I do
pip3 install torchtext==0.4.0

I get

    Collecting torchtext==0.4.0
      Could not find a version that satisfies the requirement torchtext==0.4.0 (from versions: 0.1.1, 0.2.0, 0.2.1, 0.2.3, 0.3.1)
    No matching distribution found for torchtext==0.4.0

I don’t know how to install this.

The installation instruction is at the top of the README:

Thanks, everything seems to work again now.