Struggling to install trax on my local machine

Hi there

I’m having issues installing trax on my local machine. I’ve installed version 1.3.1 and when I’m exploring the first lab, introduction to trax, when I try to import layers I get this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[3], line 3
      1 import numpy as np  # regular ol' numpy
----> 3 from trax import layers as tl  # core building block
      4 from trax import shapes  # data signatures: dimensionality and type
      5 from trax import fastmath

File ~/miniconda3/lib/python3.10/site-packages/trax/__init__.py:19
     16 """Trax top level import."""
     18 from trax import fastmath
---> 19 from trax import layers
     20 from trax import models
     21 from trax import optimizers

File ~/miniconda3/lib/python3.10/site-packages/trax/layers/__init__.py:66
     63 FilterResponseNorm = layer_configure(FilterResponseNorm)
     64 ThresholdedLinearUnit = layer_configure(ThresholdedLinearUnit)
---> 66 DotProductCausalAttention = layer_configure(
     67     DotProductCausalAttention, blacklist=['mode'])
     68 SelfAttention = layer_configure(SelfAttention, blacklist=['mode'])
     69 LSHSelfAttention = layer_configure(LSHSelfAttention, blacklist=['mode'])

File ~/miniconda3/lib/python3.10/site-packages/trax/layers/__init__.py:43, in layer_configure(*args, **kwargs)
     41 def layer_configure(*args, **kwargs):
     42   kwargs['module'] = 'trax.layers'
---> 43   return gin.external_configurable(*args, **kwargs)

TypeError: external_configurable() got an unexpected keyword argument 'blacklist'```

I’ve also tried this with the latest Trax and still having trouble installing it on my local machine.

I’m using MacOs on an intel macbook pro. Installed Python 3.10 using miniforge

I’m having the same issue trying to install TRAX on my Mac M1 machine

I have the same problem on google colab and the local machine.

I fixed the problem by installing the newest trax (1.4.1) using the command:

!pip install -q -U trax
1 Like

thx for sharing, it works