7

I have one project in which I have one one matlab code which I have to run tho' Django. I tried installing Mlabwrap ..But it gives me following error.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mlabwrap.py", line 188, in <module>
import mlabraw
ImportError: No module named mlabraw

I also tried ompc (http://ompc.juricap.com/) but after addpath...it gives me a error...

Traceback (most recent call last):                                
File "<stdin>", line 1, in <module>                              
File "C:\Python27\lib\ihooks.py", line 407, in import_module       
q, tail = self.find_head_package(parent, str(name))            
File "C:\Python27\lib\ihooks.py", line 479, in find_head_packag    
raise ImportError, "No module named '%s'" % qname            
ImportError: No module named 'addpath'                           
2
  • 3
    There is probably something wrong with the way you install these packages. I recommend you to reinstall them using some installation guides prepared for systems similar to yours. Commented Dec 20, 2011 at 13:53
  • cant the code be converted to DLL? Then you can call the DLL file. Commented Jan 12, 2012 at 14:45

2 Answers 2

1

Step 1:

Download the matlabwrap.py module from http://mlabwrap.sourceforge.net/

Step 2:

Copy the folder into your site packages folder ie. C:\Python26\Lib\site-packages

Step 3:

Using windows? go to start, and open cmd line by typing cmd enter

Step 4: navigate to the aforementioned site packages directory using cd C:\Python26\Lib\site-packages enter

step 5: type python setup.py install you should see the cmd iterate through the install process

step 6: re-open python and type import matlabwrap - it should import without problems now

Sign up to request clarification or add additional context in comments.

Comments

0

I would suggest you to download those modules and put them separately into different folder. The you can use them in your django app like this:

#settings.py:
sys.path.append("/home/visgean/scripty/pymodules/") # django modules like django_filters

They are obvisously installed wrongly. You can reinstall them or download as I suggested... Anyway it would be nice to know how exactly you installed them...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.