Why aren't python packages from Anaconda being detected by Blender? -


i've been using blender render 3d models of objects , training svm recognize pictures of object taken perspective. train said svms need use "sklearn", comes default anaconda.

long story short, want blender (which runs python 3.4.2) use packages , modules present in anaconda installation (which runs python 3.4.3).

i've tried variety of things following website: https://www.blender.org/api/blender_python_api_2_60_1/info_tips_and_tricks.html#bundled-python-extensions

1.) deleted "python" folder within blender.app. according above website, blender should fallback using version of python installed in system (i.e. 1 installed thru anaconda? right?) instead this: enter image description here 2.) go onto option number 2. so, go anaconda folder , copy 2 folders "bin" , "lib" enter image description here blender.app/contents/resources/2.76/python/ (replacing lib , bin folders there)

so far good, open blender (no error) , write simple script:

from sklearn import svm  

when try run following error message:

error: python script fail, in console now...

traceback (most recent call last): file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/scripts/marktwo.blend/simulationmarkone.py", line 5, in file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/sklearn/svm/init.py", line 13, in .classes import svc, nusvc, svr, nusvr, oneclasssvm, linearsvc, \ file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/sklearn/svm/classes.py", line 4, in .base import _fit_liblinear, basesvc, baselibsvm file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/sklearn/svm/base.py", line 9, in . import libsvm_sparse file "sklearn/svm/libsvm_sparse.pyx", line 5, in init sklearn.svm.libsvm_sparse (sklearn/svm/libsvm_sparse.c:7612) file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/sklearn/utils/init.py", line 16, in .class_weight import compute_class_weight, compute_sample_weight file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/sklearn/utils/class_weight.py", line 7, in ..utils.fixes import in1d file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/sklearn/utils/fixes.py", line 318, in scipy.sparse.linalg import lsqr sparse_lsqr file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/scipy/sparse/linalg/init.py", line 113, in .matfuncs import * file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/scipy/sparse/linalg/matfuncs.py", line 20, in import scipy.misc file "/users/cusgadmin/... perception/blender-2.76b-osx_10.6-x86_64/blender.app/contents/resources/2.76/python/lib/python3.4/site-packages/scipy/misc/init.py", line 44, in . import doccer importerror: cannot import name 'doccer' error: python script fail, in console now...

at point don't know else do. used python console embedded in blender explore sub-packages in sklearn , surprisingly getting non-matching sub-packages.. enter image description here

i confused , not know how proceed. appreciated folks.

best, mrred

alright folks, found solution , hope future generations after me , on ;)

anyway, managed able import libraries doing following:

  1. keep same files blender came (do not delete python folder website suggests!)
  2. go subfolder "site-packages" located at: "blender.app/contents/resources/2.76/python/lib/python3.4/site-packages"
  3. there, copy contents of "anaconda/lib/python3.4/site-packages" , paste them in mentioned folder
  4. (i copied within "anaconda/lib/python3.4/site-packages" except "numpy" , "requests" folders, , did not copy file "numpy-1.9.1-py3.4.egg-info" on folder.)

hope helps, , if does, you're welcome :)


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -