Rocket U2 | UniVerse & UniData

 View Only

 uv/python - pandas - DLL load failed while importing aggregations: The specified module could not be found.

Manu Fernandes's profile image
PARTNER Manu Fernandes posted 07-10-2024 06:13

hi everybody.

A strange behavior we do not understand.

on a UV/windows / 11.3.5 we have python 3.11  (the one within uv/python - no other python is installed on the machine) 

We  use module 'pandas'  in our script, release 2.2.2 is installed. 

When executed from osshell, no problem : dos /c "python path/script.py" 

When executed from uv/python, from pyCallFunction() or from TCL >PYTHON then import pandas we get this 

DLL load failed while importing aggregations: The specified module could not be found.
we do not understand what's wrong with the deploy.... What is the difference between a osshelled python call and a uv's python's one ?

any idea ? 

Many thanks for any advice 

Manu 

John Jenkins's profile image
John Jenkins

Manu,

I recommend taking a look at the Python configuration files u2.pth (the favourite) and .pyconfig.

Regards]

JJ

Mike Rajkowski's profile image
ROCKETEER Mike Rajkowski

Manu,

The Python version you run from UniVerse is the one defined for UniVerse, the one you execute at the dos prompt is based off the PATH environment variable.

Put the UniVerse Python path in your PATH environment variable, and you should be ok.

--

The following is a way to check:

>PYTHON
python> import sys
python> sys.executable
'C:\\U2\\UV\\python\\python.exe'
python> exit()
>DOS
Microsoft Windows [Version 10.0.19045.4529]
(c) Microsoft Corporation. All rights reserved.
 
C:\U2\UV>python
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec  6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'C:\\U2\\UV\\python\\python.exe'
>>> exit()
 
C:\U2\UV>echo %PATH%
;C:\U2\UV\python;C:...
Mike