我目前使用python 2.7在macOS sierra上安装了poppy-humanoid所需的所有软件包。
sudo pip install poppy-humanoid
sudo pip install poppy
sudo pip install poppy-creature
每个模块都已成功安装。
poppy-4dof-arm-mini (1.0.4) - Poppy 4 dof arm mini Software Library
poppy-creature (1.8.2) - Abstract Poppy Creature Software Library
poppy-ergo (1.0rc2) - Poppy Ergo Software Library
poppy-ergo-jr (1.7.0rc1) - Poppy Ergo Jr Software Library
poppy-humanoid (1.2.0rc1) - Poppy Humanoid Software Library
poppy-ui (0.1) - Horizon Plugin to work with Poppy's CDN
API
poppy-torso (1.1.5) - Poppy Torso Software Library
poppy (0.5.1) - Physical optics propagation (wavefront
diffraction) for optical simulations,
particularly of telescopes.
poppy_inverse_kinematics (1.3.1) - An inverse kinematics library aiming
performance and modularity
poppycdn (1.0.13) - A modular, vendor-neutral API, that wraps
provisioning instructions for all CDN
vendors that support it.
spoppy (2.1.2) - A lightweight spotify CLI
但是当我尝试导入这些软件包时会出现错误。
>>> import poppy.creature
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named poppy.creature
有人可以提供解决方法来成功导入这些软件包。
我尝试了其他解决方法,例如提供权限,扩展PYHTONPATH但没有好的
答案 0 :(得分:0)
看起来你有一个从Python网站安装的Python 2.7,以及内置的Python 2.7。您的pip
正在为您安装的2.7安装模块,但输入python
会运行内置的2.7.10,这就是为什么它没有找到。因此,如果您输入/usr/local/bin/python
而不是python
,应该有效。如果可行,您可以将~/.bash_profile
文件修改为alias python='/usr/local/bin/python'
,这样您就不必每次都输入完整路径。