Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run this on Windows? #1

Open
xiaoyuejin opened this issue Aug 6, 2012 · 2 comments
Open

How to run this on Windows? #1

xiaoyuejin opened this issue Aug 6, 2012 · 2 comments

Comments

@xiaoyuejin
Copy link

It seems this package doesn't run on windows?

@xiaoyuejin
Copy link
Author

Wow this is prompt reply!

From what I see, only slight changes are necessary for the bridge to work on windows. Here are the error messages:

from pymatbridge import Matlab
mlab=Matlab(matlab='/Applications/MATLAB_R2011b.app/bin/matlab')
mlab.start()
Starting MATLAB
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\pymatbridge__init__.py", line 37, in start
self.server_process.start()
File "C:\Python27\lib\multiprocessing\process.py", line 130, in start
self._popen = Popen(self)
File "C:\Python27\lib\multiprocessing\forking.py", line 271, in init
dump(process_obj, to_child, HIGHEST_PROTOCOL)
File "C:\Python27\lib\multiprocessing\forking.py", line 193, in dump
ForkingPickler(file, protocol).dump(obj)
File "C:\Python27\lib\pickle.py", line 224, in dump
self.save(obj)
File "C:\Python27\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "C:\Python27\lib\pickle.py", line 419, in save_reduce
save(state)
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
save(v)
File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "C:\Python27\lib\pickle.py", line 748, in save_global
(obj, module, name))
pickle.PicklingError: Can't pickle <function _run_matlab_server at 0x046564F0>: it's not found as pymatbridge._run_matlab_server

This is quite obvious, because in windows the file structure is different, and Matlab does not locate in '/Applications/MATLAB_R2011b.app/bin/matlab'.

The good thing is, I can manually start the web server using the .m file in the package. Then using mlab.running I get a True return. So, basically both Python and Matlab are working (independent of platform), while the only problem is a new bridge code for windows.

Actually I like this idea of using Matlab as a webserver. I am using a package of the same spirit. Good luck!

@ghost
Copy link

ghost commented Aug 7, 2014

Has development on this stopped? Is there a better solution now for running MATLAB once and making multiple calls from python? I too need a windows solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant