Matlab - Python 64 bit executable not recognised as 64 bit
17 次查看(过去 30 天)
显示 更早的评论
I had my Matlab (2018b 64 bit) - Python (3.6.8 64 bit) pair functioning (on Windows 10 Pro, 64 bit) for weeks and now I receive an error stating that my Python exe is not 64 bit.
>> pyversion 'C:\Data\Python36\python.exe'
Error using pyversion
Cannot use Python. Use 64-bit Python instead.
This seems to be not true as 1) it worked for weeks
2) if I check Python version then I get this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/372586/image.png)
Python folder is added to the Windows, Matlab path (and to the Python environment path as well).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/372591/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/372596/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/372601/image.png)
The latter states '64 bit version ... on win32' which is strange as my Windows is a 64 bit version as well, but for sure I have not changed anything in the Python so I guess it was like this from the beginning.
Nothing has changed except some Windows update(s) the last two days. I will remove the updates back to last week and will get back here.
Originally after start Python engine is not loaded:
>> pyversion
version: ''
executable: ''
library: ''
home: ''
isloaded: 0
So, according to the solution found on this site I try to force Matlab to use the python executable where I have installed and then I use the command
pyversion 'C:\Data\Python36\python.exe'
PC and Matlab restart does not help. Python reinstall (repair) did not help. I cannot install a second Python as 3.6.8. is the highest version which is accepted by Matlab 2018b, lower Python version cannot be installed (blocked by the higher version). Python works in its own environment.
It worked, but not now. I am puzzled.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!