发布于2020-10-30 21:51 阅读(244) 评论(0) 点赞(4) 收藏(2)
I already checked ( in stack exchange and other sites) and googled my problem but all solution seems useless. Here's the problem :
My computer had win xp and had python2.7 and panda3d (version 1.8.1) installed (python in D: and panda3d in C: ). The module was working perfectly. Unfortunately I had to format my C drive.
I upgraded to win 7 instead of installing xp again after formatting. Now I had python 2.7 in my D: drive (Which had not been formatted) working perfectly well and only had to install panda in the c: drive at same location again to make my panda files work.
I installed and followed each and every instruction while installing. ( I already had a panda.pth file in my python at my D: drive so no need to make a panda.pth file again). An option came which asked me whether I want to replace existing python and I clicked No as I had done the same the previous time. Now as I had one panda.pth file available in D:/python27 I did not go for creating another and tried to run the following line :
from direct.showbase.ShowBase import ShowBase
Which resulted in the above error. So I deleted my pth file in python27 folder and created again. Nothing worked. I completely removed python and panda3d and reinstalled the complete thing again and made a .pth file again. Still nothing works.
Then on one of the site I visited told me to check my path variables PYTHONHOME and PYTHONPATH but no such path variables are there.
I'm in total distress and none of my panda files are now starting.(Dont mark this Q as duplicate as I have already tried the other solutions in previous replied to the same Q. My problem is certainly different)
Panda3D ships with its own copy of Python 2.7. You can invoke it by running ppython.exe.
You can use a different version of Python, as long as it is the same major version (2.7) and as long as it is the same architecture (should be 32-bit, as Panda3D 1.8.1 is 32-bit). This means putting a panda.pth file in the site-packages directory, containing absolute paths to the root directory and the "bin" directory of your Panda3D installation, each on a separate line.
You could also install Panda3D 1.9.0, which will ask you during the installation whether you'd like to use an existing Python 2.7 installation, if it finds a compatible one already installed.
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
Copyright © 2018-2019 python黑洞网 All Rights Reserved 版权所有，并保留所有权利。 京ICP备18063182号-1