arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

ArcGIS Pro 2.9.3 cloned python environment gets permission denied error after upgrading python api to 2.0

Open pcsswamin opened this issue 3 years ago • 5 comments
trafficstars

Describe the bug In ArcGIS Pro 2.9.3 - cloned python environment gets permission denied error after upgrading python api to 2.0

To Reproduce Clone the default env and upgrade arcgis python api using no pin

conda upgrade -c esri --no-pin arcgis

error:

rror processing line 1 of C:\arcgispro_envs\aap20\arcgispro-py3-clone\lib\site-packages\python-certifi-win32-init.pth:
  Traceback (most recent call last):
    File "C:\arcgispro_envs\aap20\arcgispro-py3-clone\lib\site.py", line 168, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "C:\arcgispro_envs\aap20\arcgispro-py3-clone\lib\site-packages\certifi_win32\bootstrap.py", line 3, in <module>
      import wrapt
    File "<frozen importlib._bootstrap>", line 983, in _find_and_load
    File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 724, in exec_module
    File "<frozen importlib._bootstrap_external>", line 859, in get_code
    File "<frozen importlib._bootstrap_external>", line 916, in get_data
  PermissionError: [Errno 13] Permission denied: 'C:\\arcgispro_envs\\aap20\\arcgispro-py3-clone\\lib\\site-packages\\wrapt\\__init__.py'
Remainder of file ignored
Connected to pydev debugger (build 221.5591.52)
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 859, in get_code
  File "<frozen importlib._bootstrap_external>", line 916, in get_data
PermissionError: [Errno 13] Permission denied: 'C:\\arcgispro_envs\\aap20\\arcgispro-py3-clone\\lib\\site-packages\\arcgis\\__init__.py'
python-BaseException

Expected behavior Only the default env works. Any cloned env has issues once python api is upgraded.

Platform (please complete the following information): Python IDE : PyCharm professional

pcsswamin avatar May 13 '22 20:05 pcsswamin

What version of python are you running?

bruce-szalwinski avatar May 20 '22 18:05 bruce-szalwinski

Have you tried turning the machine on and off again? Sometimes the certifi_win32 package which merges the Windows OS cert store with certifi (requests certificate store) hangs.

achapkowski avatar Jun 02 '22 10:06 achapkowski

@achapkowski - Yes have restarted the machine...also noticed it on more than one machine. One way I am getting around the issue - running PyCharm prof with elevated permissions - then the error does not happen. This is not convenient or advisable in the long run for my purposes. Thing to note is that Pycharm does not need elevated permissions to access the default python env installed with Pro.

pcsswamin avatar Jun 06 '22 19:06 pcsswamin

What version of python are you running?

whatever ArcGIS Pro 2.9.3 installs. I am only trying to use other libraries not installed by esri and do not mess with the python version esri installs.

pcsswamin avatar Jun 06 '22 19:06 pcsswamin

@pcsswamin so this could be a pycharm error. If you run the script from python.exe

achapkowski avatar Jun 07 '22 10:06 achapkowski

Closing since no activity. We can reopen if needed.

nanaeaubry avatar Aug 24 '22 23:08 nanaeaubry