2
$\begingroup$

I want to use Geometry Module of sympy0.7.5 in Blender 2.71 (64 Bit). But I got some error when I try to do "from sympy import Point3D":
ImportError: cannot import name 'Point3D'.

Here is what I have done:

  1. Clone the latest sympy0.7.5:

    git clone https://github.com/sympy/sympy
    
  2. Install it in python3.4.0 [MSC v.1600 64 bit (AMD64)] (same python version in blender 2.71 except MSC v.1800 64 bit (AMD64)). The sympy's location is in c:\Python34\Lib\site-packages\.

  3. Test from sympy import Point3D"- in python3.4, everything is fine.

  4. Copy sympy folder in c:\Python34\Lib\site-packages\ to
    c:\Program Files\Blender Foundation\Blender\2.71\python\lib\

  5. In python console of the blender, it works for

       from sympy import *
       from sympy import Point
       ...
      but failed for
       from sympy import Point3D
    
$\endgroup$
2
$\begingroup$

I found the solution:

  1. get a fresh copy of sympy by git;

  2. simply copy the subdirectory "sympy" into the corresponding site-packages directory of my blender:
    c:\Program Files\Blender Foundation\Blender\2.71\python\lib\site-packages\

    Every is fine now.

ouyang

$\endgroup$
  • $\begingroup$ When I installed sympy like you did, an import raised an ImportError saying "SymPy now depends on mpmath on an external library". I asked about it on StackOverflow, and @sambler was able to help me out with that. Basically, you add the path where mpmath is, or download mpmath from Git and install it just like Sympy. The installation process has sort of changed since you posted your answer, but thankfully just a little bit. $\endgroup$ – DragonautX Oct 2 '16 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.