我目前Panda3D正在使用Panda3D附带的ppython版本。但是如何将Panda3D链接到OSX Lion 2.7.1附带的python版本?
我读了关于〜/ .bash_profile的内容,我尝试了以下内容,包括其余的bash配置文件:
# Setting PATH for EPD-7.2-2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/EPD64.framework/Versions/Current/bin:${PATH}"
export PATH
export PYTHONPATH="/Developer/Panda3D/lib/direct":$PYTHONPATH
export PYTHONPATH
MKL_NUM_THREADS=1
export MKL_NUM_THREADS
但我还是得到了
ImportError: No module named direct.showbase.ShowBase
答案 0 :(得分:3)
以下两条线在Lion上工作(我还必须设置python更喜欢32位)
sudo cp /Library/Python/2.5/site-packages/Panda3D.pth /Library/Python/2.7/site-packages/
export VERSIONER_PYTHON_PREFER_32_BIT=yes
应将导出命令放入.bashrc或等效内容。