Panda tools in a Pip installation

Under Ubuntu Linux, I see that Panda’s various tools–multify, PStats, etc.–are at time of writing included in pip-based installations, in a folder called “panda3d_tools”. However, they don’t seem to be installed to the system as runnable commands, and attempting to run “multify” at least (I haven’t tried the others, I don’t think) results in an error to the effect that it can’t find the Panda library files. (The files do exist; they’re just in the sibling-directory named “panda3d”.)

I’m guessing that I can at least get multify running by copying it into a directory along with various “.so” files, either just dumping all of them in there with it, or attempting to determine which specific ones it wants.

However, is there a more elegant and general way to get these various tools working?

For reference, I’m using Ubuntu 18.04.3, and Panda 1.10.5.dev103.

Perhaps they can be called from the Python interpreter. Or is it still in the plans.

Hmm… They appear to be executables, not Python files, so I doubt that they’re called from the interpreter.

It may well be that having these tools be installed to the system under Linux is indeed still in the works. :/

Hmm, I realized that they are in the form of packages, because pip is a python package manager.
You can register the full path to the executable file, not a short name.

I’ll admit that I’m not sufficiently familiar with pip and Python packaging to be clear on what that means in this context. ^^;

As far as I can see, they’re simply executables, just stored in the “site-packages” directory.

Aha! If I install then as root (i.e. via sudo, and with the “-H” switch to sudo), then they seem to be installed to the system!

In windows it works.

If I’m understanding you correctly, I tried that, but while the program ran, it complained about lacking certain libraries (that were in a sibling directory).

However! I posted again just above indicating that I seem to have solved the problem–in short, they work if you install as root, via sudo. :slight_smile:

1 Like

pip will automatically create links to the executables.

If you install as a local user, it will install them to something like ~/.local/bin. You must ensure that this directory is on your PATH.

Aaah, I see. I hadn’t thought to check my PATH. Thank you for that! :slight_smile:

For now, I’m happy enough with Panda installed under root permissions, I think–but I’m glad to know what it was that I missed when I was installing under my user permissions!

I’m probably a weird user, but I always get rid of PATH. My teams look like this, and that suits me perfectly.

C:\Panda3D-1.10.4.1-x64\bin\egg2bam.exe scene.egg scene.bam
pause
C:\Panda3D-1.10.4.1-x64\python\python.exe main.py
pause
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" x86_amd64

cl /Ot /I C:\PandaSourse\built_x64\include /EHsc main.cxx /link /out:C:\Demo_Shaders\bin\hello_demo.exe ^

C:\PandaSourse\built_x64\lib\libp3framework.lib ^
C:\PandaSourse\built_x64\lib\libpanda.lib ^
C:\PandaSourse\built_x64\lib\libpandaexpress.lib ^
C:\PandaSourse\built_x64\lib\libp3dtool.lib ^
C:\PandaSourse\built_x64\lib\libp3dtoolconfig.lib

pause

:slight_smile:

That’s fair; each to their own, after all. :slight_smile:

I prefer to have the convenience of being able to simply call a command by name alone, myself.

I will admit that I’m not sufficiently familiar with these elements of Linux to be confident in messing with them too much, at least without a solid reason to do so!