Borrar filtros
Borrar filtros

Fail to install Matlab R2021b in Python 3.8/3.9 - setuptools error 'PEP 440'

39 visualizaciones (últimos 30 días)
Hello there,
I have been using MATLAB-Python connection for a while now with older Python versions and Matlab releases. However, recently in my environment with Python 3.9 I found an error to install MATLAB R2021b (only MATLAB version compatible with Python 3.9).
The error occurs when I run the setup.py file in extern/engines/python/dist see the error message below:
UserWarning: The version specified ('R2021b') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
warnings.warn(
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: no commands supplied
I believe it relates with the version numering of MATLAB being not valid for PEP 440. I checked by setuptools version and it is 60.2.0.
PS: I also tried to install R2021b in a newly created environment with Python 3.8 and setup tools 60.5.0 but got the same error.
Is there any solution to this error, or a way to avoid this version numbering check?
Thank you.

Respuesta aceptada

r_avelino
r_avelino el 19 de En. de 2022
The error goes away if the keyword ``install`` is used
python setup.py install
  6 comentarios
Vinay Kulkarni
Vinay Kulkarni el 9 de Oct. de 2023
I am using virtual environment using conda with python python version 3.19.18 . As per the document it should support the version.
Randall Pittman
Randall Pittman el 11 de Abr. de 2024
Edit matlabroot/extern/engines/python/setup.py. At the end of the file in the setup() call, change the version= argument to the numeric version found in matlabroot/VersionInfo.xml.
This has been fixed in later versions of MATLAB (setup.py now has a PEP 440-compatible version number)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by