Filter löschen
Filter löschen

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

39 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

r_avelino
r_avelino am 19 Jan. 2022
The error goes away if the keyword ``install`` is used
python setup.py install
  6 Kommentare
Vinay Kulkarni
Vinay Kulkarni am 9 Okt. 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 am 11 Apr. 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)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by