locuslab / mpc.pytorch

A fast and differentiable model predictive control (MPC) solver for PyTorch.
https://locuslab.github.io/mpc.pytorch/
MIT License
872 stars 146 forks source link

Fail to install mpc #45

Closed niezifei closed 4 months ago

niezifei commented 4 months ago

Hi, The mpc package (version 0.0.4) specifies its dependency on numpy in a non-standard way, which will cause problems with future versions of pip. The current dependency specifier is written as numpy>=1<2, which is not a valid format.

The standard way to specify the dependency should be numpy>=1.0,<2.0.

Collecting mpc
  Using cached mpc-0.0.4.tar.gz (17 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      error in mpc setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier)
          numpy>=1<2
               ~~~^
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
shizhec commented 3 months ago

Hi Fei, I wonder have you solve this issue? I am facing the same issue too.

shizhec commented 3 months ago

Hi Fei, I wonder have you solve this issue? I am facing the same issue too.

Manually install it by pip install -e . solved this issue.