Fail to install Matlab R2021b in Python 3.8/3.9 - setuptools error 'PEP 440'
39 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
r_avelino
il 19 Gen 2022
Commentato: Randall Pittman
il 11 Apr 2024
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.
0 Commenti
Risposta accettata
r_avelino
il 19 Gen 2022
6 Commenti
Vinay Kulkarni
il 9 Ott 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
il 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)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!