Installation on WSL Ubuntu 20.04
See original GitHub issueSo as it’s mentioned that Trax cannot run on windows, I’m using Ubuntu 20.04 subsystem. I installed jax without any hassle but I can’t install trax. I’m getting this issue using the command: pip3 install -q -U trax
` ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-yp5eujux/pygame/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-yp5eujux/pygame/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ egg_info --egg-base /tmp/pip-install-yp5eujux/pygame/pip-egg-info cwd: /tmp/pip-install-yp5eujux/pygame/ Complete output (20 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: freetype-config: not found
/bin/sh: 1: freetype-config: not found
/bin/sh: 1: freetype-config: not found
Hunting dependencies...
WARNING: "sdl-config" failed!
WARNING: "pkg-config freetype2" failed!
WARNING: "freetype-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. `
Python version : 3.8.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)

 Top Related Medium Post
Top Related Medium Post Top Related StackOverflow Question
Top Related StackOverflow Question
So some of my issues stemmed from a lack of familiarity with linux and the fact that a straightforward pip installation goes to the global python’s /bin folder. Calling the pip that is in the specific conda environment in question actually solved all my problems. I did not have to downgrade python, or install pygame separately.
I then ran into yet another problem using
trax.supervised.trainer_lib.init_random_number_generators(31)to set the random seed, so I tried installing trax using pip with the current github release as the source. This worked fine, but did not solve the problem.So for posterity, if anyone else encounters any of these problems installing trax and wants to do so in Ubuntu 20.04, I would suggest that you: 1.) Work from a conda environment 2.) install everything need using
conda install3.) Finally, install trax from the current github release by using the following (note the path to your conda environment’s git may vary):Finally, I would implore the maintainers of trax to simply make it available via anaconda cloud, i.e.
conda install.I actually had to install pygame separately, even though with some issues. I installed pygame and then trax was just easily installed.