question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation on WSL Ubuntu 20.04

See original GitHub issue

So 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:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tyarosevichcommented, Oct 7, 2020

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 install 3.) Finally, install trax from the current github release by using the following (note the path to your conda environment’s git may vary):

conda activate myEnv
conda install git pip
home/userName/anaconda3/envs/myEnv/bin/pip install git+git://github.com/google/trax

Finally, I would implore the maintainers of trax to simply make it available via anaconda cloud, i.e. conda install.

0reactions
Nishant-Pallcommented, Oct 7, 2020

I actually had to install pygame separately, even though with some issues. I installed pygame and then trax was just easily installed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install Ubuntu on WSL2 on Windows 10
Overview · Install WSL · Download Ubuntu · Configure Ubuntu · Install your first package · Customising your Terminal with Windows Terminal Preview...
Read more >
Install Linux on Windows with WSL - Microsoft Learn
Install Windows Subsystem for Linux with the command, wsl --install. Use a Bash terminal on your Windows machine run by your preferred Linux...
Read more >
How to Install WSL and Ubuntu 20.04 LTS on Windows 10
First open Microsoft Store and download Ubuntu 20.04 LTS. · Install and Launch Ubuntu 20.04. · After Username and Password enter. · Start...
Read more >
How To Install the Windows Subsystem for Linux 2 on ...
Step 1 — Enabling Windows Services for the WSL · Step 2 — Installing Ubuntu 20.04 using the WSL · Step 3 —...
Read more >
How to Install Ubuntu on Windows 10 WSL - Linux Hint
Installing and Configuring Ubuntu on Windows 10 WSL: Once your computer starts, open Microsoft Store from the Start menu as shown in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found