Is it a Conda Issue?

169
6
Jump to solution
01-24-2021 06:50 AM
Labels (1)
MarcSwartz
New Contributor III

How do I trouble shoot this problem?    

ArcGIS Pro 2.7 Windows 10 Pro

From a Python Command Prompt

conda --version

returns this

(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>conda --version
Traceback (most recent call last):
File "site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py", line 7, in <module>
File "c:\apps\conda\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "multiprocessing\__init__.py", line 16, in <module>
File "c:\apps\conda\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "multiprocessing\context.py", line 6, in <module>
File "c:\apps\conda\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "multiprocessing\reduction.py", line 16, in <module>
File "c:\apps\conda\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "socket.py", line 49, in <module>
ImportError: dynamic module does not define module export function (PyInit__socket)
[15460] Failed to execute script pyi_rth_multiprocessing

(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>

 

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Frequent Contributor

I don't use a clone.  So I suspect that your clone is missing the administrative stuff that the base environment has, or your permissions don't enable you to run/use the admin environment.

You haven't indicated what you want to do?  

You won't be able to update conda in any event.

You can install packages in your clone when you are logged in and using the clone.

Perhaps some clarification would help.  The fact that you can't determine the conda version doesn't indicate a problem because the Scripts folder is before the path of the clone

C:\arc_pro\bin\Python\Scripts    # proenv.bat location

C:\arc_pro\bin\Python\envs\arcgispro-py3   # my only environment

C:\arc_pro\bin\Python\envs\...the clone ...    # in general, this is what you control as a non-admin


... sort of retired...

View solution in original post

6 Replies
DanPatterson
MVP Frequent Contributor

 

You should be running proenv.bat

Make a shortcut

  Target :  C:\arc_pro\bin\Python\Scripts\proenv.bat

Start in:  C:\arc_pro\bin\Python\envs\arcgispro-py3

where arc_pro is your install folder for ArcGIS Pro.

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda --version
conda 4.3.27

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>

 

It doesn't look like you have the base/main pro environment activated which would be in

C:\YourInstallFolder\bin\Python\envs\arcgispro-py3

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3

 

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda info --envs
# conda environments:
#
arcgispro-py3         *  C:\arc_pro\bin\Python\envs\arcgispro-py3
root                     C:\arc_pro\bin\Python
(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>

 

>conda info --envs
# conda environments:
#
arcgispro-py3 * C:\arc_pro\bin\Python\envs\arcgispro-py3
root C:\arc_pro\bin\Python


(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>


... sort of retired...
MarcSwartz
New Contributor III

First off, Dan thanks for responding!

Current Environment

MarcSwartz_0-1611578496825.png

In a command window I ran this

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>"C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\proenv.bat"

then tested with conda --version

issue persists

MarcSwartz_1-1611579249379.png

Of note:  When I run under an Admin account I do not have this problem, but it is against out IT policy to operate software under an Admin account.  And the Clone I create under an Admin Account is not accessible as a General user (local account?)

 

 

Reply
0 Kudos
DanPatterson
MVP Frequent Contributor

I don't use a clone.  So I suspect that your clone is missing the administrative stuff that the base environment has, or your permissions don't enable you to run/use the admin environment.

You haven't indicated what you want to do?  

You won't be able to update conda in any event.

You can install packages in your clone when you are logged in and using the clone.

Perhaps some clarification would help.  The fact that you can't determine the conda version doesn't indicate a problem because the Scripts folder is before the path of the clone

C:\arc_pro\bin\Python\Scripts    # proenv.bat location

C:\arc_pro\bin\Python\envs\arcgispro-py3   # my only environment

C:\arc_pro\bin\Python\envs\...the clone ...    # in general, this is what you control as a non-admin


... sort of retired...

View solution in original post

MarcSwartz
New Contributor III

Dan,

Fixing Software issues is a process of elimination.  You have eliminate one of my question.  Is it a Conda Issue? Answer is No.  You have also mirrored one of my concerns "So I suspect that your clone is missing the administrative stuff that the base environment has

Thank you for your time and the next path for my investigation.

Reply
0 Kudos
MarcSwartz
New Contributor III

Dan,

Just to let you know, here are the steps we used to Clone the Default Python environment as a non-Admin user.

Open a CMD window at C:\Program Files\ArcGIS\Pro\bin\Python\Scripts as this was the only location where conda would run.  Strange, but it is a very restricted IT environment out of my control.

Activate the default python environment

C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>activate arcgispro-py3

Clone the default python environment

(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>conda create --clone arcgispro-py3 --name C:\Users\YourProfile\AppData\Local\ESRI\conda\envs\agp2p7_py3_clone2

After the cloning was done we activated the new clone and installed a python package with pip

(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>activate C:\Users\YourProfile\AppData\Local\ESRI\conda\envs\agp2p7_py3_clone2

(C:\Users\YourProfile\AppData\Local\ESRI\conda\envs\agp2p7_py3_clone2) C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>pip install laspy

Note to others:This is a non standard method that happend to work for the restricted IT environment I operate in.

The YourProfile is where you need to change to what you use on your computer.  Direct copy and paste will not work.

Reply
0 Kudos
DanPatterson
MVP Frequent Contributor

Although newer versions of conda are supposed to behave better with pip, be careful.  if you can add conda-forge to your channels to search.  We had similar issues when I was teaching and we ended up installing what we needed in the base environment to avoid the whole clone thing.  It worked well.

Many an article has been written by my previous incarnation on the clone wars  😉

clones2.png

Clone... ArcGIS Pro ... for non administrators - GeoNet, The Esri Community


... sort of retired...
Reply
0 Kudos