1

I get the following error message using Python v2.7.5 and scipy v0.12.0 with py2exe v0.6.9 on a 32 bit machine using 32 bit versions of the packages from Christoph Gohlke. If anyone can provide relevant and useful suggestions I would greatly appreciate it. Here is the error message:

Traceback (most recent call last):
  File "MainWindow.py", line 13, in <module>
    from svm.svm import SVM
  File "svm\svm.pyc", line 4, in <module>
  File "sklearn\svm\__init__.pyc", line 13, in <module>
  File "sklearn\svm\classes.pyc", line 3, in <module>
  File "sklearn\linear_model\__init__.pyc", line 20, in <module>
  File "sklearn\linear_model\sgd_fast.pyc", line 12, in <module>
  File "sklearn\linear_model\sgd_fast.pyc", line 10, in __load
  File "weight_vector.pxd", line 14, in init sklearn.linear_model.sgd_fast     
  (sklearn\linear_model\sgd_fast.c:13206)
ImportError: No module named weight_vector

This is my setup.py file:

from distutils.core import setup
import py2exe

import sys
sys.path.append('../')
dcm = 'dcm.testDCM'
svm_path = 'svm.svm'

setup(windows=[{"script":"MainWindow.py"}],
      options={"py2exe":{
                    "includes" : ["sip", dcm, svm_path,
                                  'sklearn',
                                  'scipy.sparse.csgraph._validation',
                                  'sklearn.linear_model.sgd_fast.weight_vector']}})

Actually, I have solved the problem in this question scipy with py2exe problesm and solved it using the second answer in that question (the answer), adding the "scipy.sparse.csgraph._validation" in my includes options for the py2exe.

Then I want to do the similar thing for the error "No module named weight_vector", say, adding the "sklearn.linear_model.sgd_fast.weight_vector" in my includes options. However, it didn't work.

I check the directory "sklearn.linear_model.sgd_fast" only to find that the sgd_fast is a ".pyd" file rather than a .py file. Maybe this is why my methods cannot work.

I didn't get any idea about dealing with the pyd file. Have anybody met the similar problems or got any ideas? I really need your help.

Community
  • 1
  • 1

0 Answers0