VMware Horizon Community
HallJ0816
Enthusiast
Enthusiast

Has anyone attempted to package Anaconda3?

 

Hi

Im running an 2.18.6 deployment of AppVolumes and Im having an issue with CLI based application called Anaconda3. I'm able to package it but package throws an error after user launches spyder which is baked into Anaconda. Curious if anyone has had any success or is familiar with packaging command line based applications

0 Kudos
7 Replies
praviview
Enthusiast
Enthusiast

installed Python 3.7.1 (Anaconda3 2018.12 64-bit) (2018.12) and its a simple installation, after your installation you will able to see anaconda prompt if you search on your windows search bar. 

 

praviview_1-1620645303482.png

 

Praveen C
L3admins.com
0 Kudos
hermanc01
Enthusiast
Enthusiast

I've been deploying this for a while without any issues.  Here's the install string I use to capture it.

"Anaconda3[version].exe" /InstallationType=AllUsers /AddToPath=0 /RegisterPython=0 /S /D=C:\Anaconda3

 

0 Kudos
HallJ0816
Enthusiast
Enthusiast

Hi @hermanc01. I don't have a issue packaging Anaconda. The problem I'm having is when customer try's to run a plugin that I install on the Anaconda package via (PIP Install), Issue im seeing is when a user launches Sypder from within Anaconda navigator (GUI) the additional plugins stop working. But if customer never launches Spyder all additional plugins work fine without any issues. Screenshot below shows the error my customer gets

HallJ0816_0-1620677245587.png

 

0 Kudos
MagnusDB
Contributor
Contributor

I have a similar issue with Anaconda3 packaging. I'm using the default instalation directory (C:\ProgramData\Anaconda3) in an instalation for all users. The CLI based application is able to run the Anaconda prompt, but the anaconda-navigator won't open. Running through CMD I got the error in the attached image.

I also got some weird errors when importing numpy and matplotlib packages. The errors says:
'File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\__ini__.py, line 126, in <module> from numpy.__config__ import show as show_config
ModuleNotFoundError: No module name 'numpy.__config__'

And in the end, it follows:
"ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there."


It might be important to highligh that only anaconda3 was installed (conda version 4.10.1 and python version 3.8.8) during the packaging process, i.e. no pyqt or other libs were installed before or after anaconda3 installation, which could cause some incompatibilities and problems.

I will try the suggested command and check if it solves the problem
"Anaconda3[version].exe" /InstallationType=AllUsers /AddToPath=0 /RegisterPython=0 /S /D=C:\Anaconda3

0 Kudos
Micheal_A
VMware Employee
VMware Employee

Try leveraging ThinApp to capture this installation and see what is actually missing or trying to access during the plug-in access. This is the best way I find to see all registry and system files being laid down to find the problems at hand.

VMware EUC by Broadcom
https://techzone.vmware.com/
0 Kudos
MagnusDB
Contributor
Contributor

Thank you for your reply Micheal. We have not tested yet your suggestion, but hermanc01 command did not work for us. The same problem persisted. Nevertheless, something interesting occured in some tests.

After the capture, when we renamed the Anaconda directory to any other name and then renamed it back to the original name the software works perfectly. We noticed that in the first time, it tooks a couple of minutes to complete (probably copying files from C:\SnapVolumesTemp\MountPoints\{...}\{...}\Anaconda3 to the user space) , but when renaming back to the original name, it tooks less than one second (no physical copy required). Hence, we think maybe Anaconda3 is keeping some wrong references when inside the SnapVolumesTemp. Let's see if we can find out a solution based on your suggestion.

0 Kudos
MagnusDB
Contributor
Contributor

Well, well, What can I say...
After we noticed that renaming Anaconda3 directory and naming it back again (after the packaging ​proccess) made it work properly for the user, we experimentally try to do the same procedure while capturing the package and .... voilà... it worked.

In other words, after installing Anaconda3 for all users and installing some libraries for python while packaging, we just renamed "C:/Anaconda3" directory as "C:/Anaconda3abc" (it took some time) and then renamed it back to "C:/Anaconda3". For some reason it was enough to make Anaconda work properlly for the final user.

0 Kudos