symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.41k stars 145 forks source link

pip install -r dev_requirements.txt not working #150

Closed fredbje closed 2 years ago

fredbje commented 2 years ago

Describe the bug I am trying to build the project from source. I cloned the repo, created a virtual environment:

python3  -m venv symforce-env  
source symforce-env/bin/activate

Then I ran pip install -r requirementst.txt, but encountered the following error:

pip install -r dev_requirements.txt 
...
Collecting setuptools==62.1.0
  Downloading setuptools-62.1.0-py3-none-any.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 14.7 MB/s 
Building wheels for collected packages: skymarshal, symforce-sym
  Building wheel for skymarshal (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/fbjerkas/src/symforce/symforce-env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-er30tfnh/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-er30tfnh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-rdqk8oag
       cwd: /tmp/pip-req-build-er30tfnh/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for skymarshal
  Running setup.py clean for skymarshal
  Building wheel for symforce-sym (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/fbjerkas/src/symforce/symforce-env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1yfp4j9j/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-1yfp4j9j/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-e82c3vbr
       cwd: /tmp/pip-req-build-1yfp4j9j/
  Complete output (8 lines):
  /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'license_file'
    warnings.warn(msg)
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for symforce-sym

Environment (please complete the following information): I am on ubuntu 20.04, Python 3.8.10, latest commit ad2a796fa111860.

fredbje commented 2 years ago

I ran pip install -r dev_requirements.txt again, and now it seems to work. I did not make any changes between the attempts.

pip install -r dev_requirements.txt
...
Building wheels for collected packages: skymarshal, sym
  Building wheel for skymarshal (setup.py) ... done
  Created wheel for skymarshal: filename=skymarshal-0.4-py3-none-any.whl size=81261 sha256=7a01377dce3d52ca15058420de3a6bfbf82aa7c0fb15f9ae80eb6dace8f64d66
  Stored in directory: /tmp/pip-ephem-wheel-cache-q24lb3b5/wheels/32/6f/d4/7115528670fd830d42ec789ee03a5ba4fac88aae8845703e59
  Building wheel for sym (setup.py) ... done
  Created wheel for sym: filename=sym-0.0.0-py3-none-any.whl size=62470 sha256=9fd61e1d4c79389c2ead4e3ea56497fc205e1182dba8fc37b8778e96356601f6
  Stored in directory: /tmp/pip-ephem-wheel-cache-q24lb3b5/wheels/b4/34/b7/debe0e93bf42c8e6c3bf11ab84951f663f4f5723bdec8e577f
Successfully built skymarshal sym
Installing collected packages: sym, skymarshal
  Attempting uninstall: skymarshal
    Found existing installation: skymarshal 0.4
    Uninstalling skymarshal-0.4:
      Successfully uninstalled skymarshal-0.4
Successfully installed skymarshal-0.4 sym-0.0.0
aaron-skydio commented 2 years ago

I think it's possible this was some kind of setuptools incompatibility, and the initial pip install installed a compatible version of setuptools so that the second run succeeded? Going to close for now but if this is a recurring issue we'll do something to fix