title: Unpacking a model trained with 64 bit machine on a 32 bit raspberry pi
body: <p>I am getting this error while testing a model trained using 64-bit machine on a 32-bit raspberry pi. </p>
  
  <p>This question has been asked twice years before but still is unanswered.</p>
  
  <p>1) <a href="https://stackoverflow.com/questions/21033038/scikits-learn-randomforrest-trained-on-64bit-python-wont-open-on-32bit-python">scikits-learn-randomforrest-trained-on-64bit-python-wont-open-on-32bit-python</a></p>
  
  <p>2) <a href="https://stackoverflow.com/questions/39238444/workaround-for-32-64-bit-serialization-exception-on-sklearn-randomforest-model">workaround-for-32-64-bit-serialization-exception-on-sklearn-randomforest-model</a></p>
  
  <p>So to solve the problem If I must train the model with 32-bit then how do I create a virtual environment for it on a 64-bit machine?</p>
  
  <pre><code>Traceback (most recent call last):
    File "main_radar.py", line 49, in &lt;module&gt;
      DT1 = joblib.load('models/DT1.sav')
    File "/usr/local/lib/python2.7/dist-
  packages/sklearn/externals/joblib/numpy_pickle.py", line 578, in load
      obj = _unpickle(fobj, filename, mmap_mode)
    File "/usr/local/lib/python2.7/dist-
  packages/sklearn/externals/joblib/numpy_pickle.py", line 508, in 
  _unpickle
      obj = unpickler.load()
    File "/usr/lib/python2.7/pickle.py", line 858, in load
      dispatch[key](self)
    File "/usr/lib/python2.7/pickle.py", line 1133, in load_reduce
      value = func(*args)
    File "sklearn/tree/_tree.pyx", line 601, in 
  sklearn.tree._tree.Tree.__cinit__
  ValueError: Buffer dtype mismatch, expected 'SIZE_t' but got 'long long'
  </code></pre>
  
  <p>Thank you very much.
  Would be really helpful if someone can address this issue.</p>