symforce-org / symforce

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

`pip install -r dev_requirements.txt` does not upgrade pip first #241

Open aaron-skydio opened 2 years ago

aaron-skydio commented 2 years ago

Describe the bug Some versions of our pinned packages require a minimum version of pip to install, e.g. matplotlib 3.5.2 will not install with pip 20.x. This means that just running pip install -r dev_requirements.txt does not succeed without first upgrading pip. We need to either add instructions around this or possibly add a step to install the pinned version of pip, or possibly add a way of installing unpinned dependencies for the cmake build instead of suggesting installing dev_requirements.txt.

To Reproduce set up a python environment with pip 20.x pip install -r dev_requirements.txt

Example output:

Collecting matplotlib==3.5.2
  Using cached matplotlib-3.5.2.tar.gz (35.2 MB)
    ERROR: Command errored out with exit status 1:
     command: /Users/xipeng.wang/symforce/build/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ql/sfv8hvnn4ls7t39bfd966vfc0000gq/T/pip-install-c0qnnz3_/matplotlib/setup.py'"'"'; __file__='"'"'/private/var/folders/ql/sfv8hvnn4ls7t39bfd966vfc0000gq/T/pip-install-c0qnnz3_/matplotlib/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 /private/var/folders/ql/sfv8hvnn4ls7t39bfd966vfc0000gq/T/pip-pip-egg-info-zolkf872
         cwd: /private/var/folders/ql/sfv8hvnn4ls7t39bfd966vfc0000gq/T/pip-install-c0qnnz3_/matplotlib/q

Expected behavior Requirements get installed

Environment (please complete the following information):