Showing results for 
Search instead for 
Did you mean: 

Python in DIAdem, sharing resources with Anaconda environment

I had Anaconda environment for python programming, and added DIAdem newly installed with python.   When I installed pandas under DIAdem folder, it worked.   However I felt that's not smart to have two independent python resources in different folder, so I added Anaconda3/Lib/site-packages folder to sys.path so that python in DIAdem can access to the anaconda's library.   Unfortunately this causes import error of numpy, with error message "Importing the numpy C-extensions failed.".   The packages of pandas and numpy work flawlessly on Anaconda, so those packages are compatible.   Your any suggestion to resolve this issue would be appreciated.


Also, is there anybody who runs python on both DIAdem and Anaconda successfully with or without sharing packages?   How could you make that possible?

0 Kudos
Message 1 of 3

Hi, I've been used DIAdem + Python for more than 1 year now. I also utilise some extra packages (numpy, pandas, mysql.connector, etc.


I think it is not bad to have multiple python environments; I was used to having many of them on my PC even before I started using DIAdem+Python.


Imagine every python environment as a "tailored" one for the application you're developing. If I were you, I'd keep working the way you're doing, with a custom environment for your DIAdem.


That's my point of view; of course I could be wrong, I'm just a DIAdem user and not an NI consultant. However, let's see if someone else shows up, I am also interested in this topic.

0 Kudos
Message 2 of 3

Having different environment structures and libraries for each project is crucial in python development since there can be many cases when you will need to install a specific version of a library. In that case, it would be impossible to use one shared environment. So It is completely ok to have dedicated environments with each project.

0 Kudos
Message 3 of 3