如何将 mpmath 安装为 Blender 的外部库?

How can I install mpmath as an external library for Blender?

我有兴趣试用 Blender 的 sympy(v2.76,Python 3.4.2 控制台,Windows 8.1)。我从 Blender SE 关注这个 answer,从 Githib 下载 sympy 作为 ZIP,并将 sympy 文件夹移动到 C:\Program Files\Blender Foundation\Blender.76\python\lib\site-packages。但是,当我打开 Blender 并尝试在 Python 控制台中导入 sympy 时,出现以下错误:

>>> import sympy
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\Blender.76\python\lib\site-packages\sympy\__init__.py", line 20, in <module>
    raise ImportError("SymPy now depends on mpmath as an external library. "
ImportError: SymPy now depends on mpmath as an external library. See http://docs.sympy.org/latest/install.html#mpmath for more information. 

我不知道如何安装外部库。我尝试转到 ImportError 中提到的 link,我看到了 pip install mpmath。我在 cmd 中尝试过,但得到了这个:

>pip install mpmath
Requirement already satisfied (use --upgrade to upgrade): mpmath in c:\anaconda3
\lib\site-packages

我刚才确实安装了 Anaconda,所以我想有这个输出是有意义的。如何将 mpmath 安装为 Blender 的外部库,以便我可以在其中导入 sympy?

您想将 mpmath 安装到 blenders python 文件夹中,就像您为 sympy 所做的那样。

您的 运行 pip 示例是在安装的系统 python 中完成的,该系统设置为查找您在 c:\anaconda3\lib\site-packages

中安装的 mpmath

另一种选择是通过将现有路径添加到 sys.path 或在启动 blender 之前将其添加到 PYTHONPATH 环境变量来使用现有安装的 mpmath 和 sympy。