-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing new clean environment with arcpy fails on lxml (ImportError: DLL load failed while importing etree) #2114
Comments
I am having this issue too. |
Thank you for the detailed report! EDIT: While I could not reproduce on Pro 3.3 machine I was able to reproduce the |
@ew-pov / @eroubenoff-expo: could you try and retest on your pro 3.2 machines now? I just uploaded a new arcpy/arcpy-base package with pinning to restrict Because Pro >3.3 ships with The issue with your machine being unable to clone is interesting, do you have deep-learning libraries installed @ew-pov? If not I think your base install has some extra packages lying around in arcgispro-py3 which is conflicting the clone. To get arcgispro-py3 back to a "clean" state: uninstall deep-learning (if installed), uninstall Pro, navigate to your install directory (by default: |
Thanks for looking into this issue. Just an update with all the results of testing. Create 3.2 environmentI can confirm that Create 3.1 environmentAdditionally, I did try to make a 3.1 environment with (After the pinning of lxml, I've retried to recreate th the arcpy=3.1 environment without the lxml contraint. This does work as well! At least, the creating. After
Pity, but understandable. LXML 5+So, now I know it won't work with arcpy=3.3 and Desktop=3.2, I won't pursue that issue any further. Nonetheless, I still think, there is a weird lxml>=5 DLL issue somewhere... CloningWe just had a reinstall of our environment. Hence, I could start with a clean slate. I did perform a Details
Final results:
What I could see as an "issue" is that we should maybe update the arcpy (arcpy-base) packages first, before cloning? However, |
Just checking if somebody might know why the cloning does not work... @cleebp ? |
@ew-pov can you confirm that you are trying to clone a clean arcgispro-py3 environment with no additional packages installed via conda/pip? I just stood up a clean 3.2.4 machine and am able to clone arcgispro-py3, as long as your environment has not been modified cloning should work okay out of the box. If you previously had pip/conda installed packages into arcgispro-py3 the uninstaller will not remove these files and they must be deleted manually before reinstalling, my instructions above should work. If you want you can also try removing your local package cache at I see in your details for the clone the following files listed
Here is my 3.2.4 clone output:
|
@cleebp Thanks for the detailed look into this. I think that I am doing a clean install, because every month we get a clean environment. Despite that, I just had a look in
detailsanyio 3.5.0 py39haa95532_0 appdirs 1.4.4 pyhd3eb1b0_0 arcgis 2.2.0.1 py39_39 esri arcgispro 3.2 0 esri arcpy 3.2 py39_arcgispro_49743 [arcgispro] esri arcpy-base 3.2 py39_49743 esri argon2-cffi 21.3.0 pyhd3eb1b0_0 argon2-cffi-bindings 21.2.0 py39h2bbff1b_0 arrow-cpp 12.0.0 2 esri asttokens 2.0.5 pyhd3eb1b0_0 attrs 22.1.0 py39haa95532_0 azure-core 1.12.0 py_0 esri azure-storage-blob 12.8.0 py_0 esri babel 2.11.0 py39_1 esri backcall 0.2.0 pyhd3eb1b0_0 esri beautifulsoup4 4.12.2 py39haa95532_0 black 22.1.0 py39_3 esri blas 1.0 mkl bleach 4.1.0 pyhd3eb1b0_0 blinker 1.4 py39haa95532_0 bottleneck 1.3.5 py39h080aedc_0 brotli 1.0.9 0 esri brotli-bin 1.0.9 0 esri brotlipy 0.7.0 py39h2bbff1b_1003 c-ares 1.19.1 0 esri cachetools 4.2.2 pyhd3eb1b0_0 certifi 2023.7.22 py39haa95532_0 cffi 1.15.1 py39h2bbff1b_3 cftime 1.6.2 py39_0 esri chardet 4.0.0 py39haa95532_1003 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.0.4 py39haa95532_0 cloudpickle 2.0.0 pyhd3eb1b0_0 colorama 0.4.6 py39haa95532_0 contourpy 1.0.5 py39h59b6b97_0 cppzmq 4.9.0 0 esri cryptography 41.0.3 py39_2 esri cycler 0.11.0 pyhd3eb1b0_0 cytoolz 0.11.0 py39h2bbff1b_0 dask 2023.3.2 py_0 esri dask-core 2023.3.2 py39haa95532_0 debugpy 1.5.1 py39hd77b12b_0 decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pyhd3eb1b0_0 distributed 2023.3.2 py_0 esri dpcpp-cpp-rt 2022.2.1 arcgispro_19741 [arcgispro] esri entrypoints 0.4 py39haa95532_0 et_xmlfile 1.1.0 py39haa95532_0 exceptiongroup 1.0.0rc9 pyhd8ed1ab_0 esri executing 0.8.3 pyhd3eb1b0_0 flake8 4.0.1 pyhd3eb1b0_1 fonttools 4.25.0 pyhd3eb1b0_0 freetype 2.12.1 4 esri fsspec 2023.4.0 py39haa95532_0 future 0.18.2 py39_2 esri gdal 3.7.0 arcgispro_py39_17195 [arcgispro] esri geomet 1.0.0 py_0 esri greenlet 1.1.1 py39hd77b12b_0 h5py 3.9.0 arcgispro_py39_1 [arcgispro] esri heapdict 1.0.1 pyhd3eb1b0_0 icc_rt 2022.2.1 arcgispro_19741 [arcgispro] esri idna 3.4 py39haa95532_0 importlib-metadata 6.0.0 py39haa95532_0 importlib_metadata 6.0.0 hd3eb1b0_0 iniconfig 1.1.1 pyhd3eb1b0_0 esri intel-cmplr-lib-rt 2022.2.1 arcgispro_19741 [arcgispro] esri intel-fortran-rt 2022.2.1 arcgispro_19741 [arcgispro] esri intel-openmp 2022.2.1 arcgispro_19741 [arcgispro] esri ipykernel 6.16.0 py_1 esri ipython 7.34.0 pyhbfea036_1 esri ipython_genutils 0.2.0 pyhd3eb1b0_1 ipywidgets 7.7.2 py_0 esri isodate 0.6.0 py_0 esri jdcal 1.4.1 pyhd3eb1b0_0 jedi 0.18.2 py_1 esri jinja2 3.0.3 pyhd3eb1b0_0 jpeg 9e 0 esri json5 0.9.5 py_0 esri jsonschema 4.17.3 py39haa95532_0 jupyter_client 6.1.12 py_0 esri jupyter_console 6.4.2 py_0 esri jupyter_contrib_core 0.4.0 py_0 esri jupyter_contrib_nbextensions 0.6.0 py_2 esri jupyter_core 4.11.2 py39_1 esri jupyter_highlight_selected_word 0.2.0 py_4 esri jupyter_latex_envs 1.4.6 py_5 esri jupyter_nbextensions_configurator 0.4.1 py_3 esri jupyter_server 1.21.0 py_0 esri jupyterlab 3.4.8 py_0 esri jupyterlab_pygments 0.2.2 py_0 esri jupyterlab_server 2.16.0 py_1 esri jupyterlab_widgets 3.0.3 py_1 esri keyring 23.4.0 py39_0 esri kiwisolver 1.4.4 py39hd77b12b_0 krb5 1.21.1 0 esri libabseil 20230125.3 0 esri libbrotlicommon 1.0.9 0 esri libbrotlidec 1.0.9 0 esri libbrotlienc 1.0.9 0 esri libdeflate 1.17 h2bbff1b_0 libpng 1.6.39 h8cc25b3_0 libprotobuf 3.21.12 0 esri libsodium 1.0.18 5 esri libthrift 0.18.1 0 esri libtiff 4.5.1 0 esri libutf8proc 2.8.0 0 esri libxml2 2.10.4 arcgispro_0 [arcgispro] esri libxslt 1.1.37 3 esri locket 1.0.0 py39haa95532_0 lxml 4.9.1 py39_1 esri lz4 3.1.3 py39h2bbff1b_0 lz4-c 1.9.4 0 esri markupsafe 2.1.1 py39h2bbff1b_0 matplotlib 3.6.3 py39_arcgispro_0 [arcgispro] esri matplotlib-base 3.6.3 py39_arcgispro_0 [arcgispro] esri matplotlib-inline 0.1.6 py39haa95532_0 mccabe 0.7.0 pyhd3eb1b0_0 mistune 2.0.4 py39haa95532_0 mkl 2022.2.1 arcgispro_19755 [arcgispro] esri mkl-service 2.4.0 py39_arcgispro_2 [arcgispro] esri mkl_fft 1.3.1 py39_arcgispro_5 [arcgispro] esri mkl_random 1.2.2 py39_arcgispro_5 [arcgispro] esri mpmath 1.2.1 py39haa95532_0 msgpack-python 1.0.3 py39h59b6b97_0 msrest 0.6.21 py_0 esri munkres 1.1.4 py_0 mypy_extensions 0.4.3 py39haa95532_1 nbclassic 0.4.8 py_0 esri nbclient 0.7.0 py_3 esri nbconvert 7.2.1 py_2 esri nbformat 5.6.1 py_0 esri nest-asyncio 1.5.6 py39haa95532_0 netcdf4 1.6.4 py39_arcgispro_0 [arcgispro] esri networkx 2.8.4 py39haa95532_1 nlohmann_json 3.11.2 0 esri nose 1.3.7 pyhd3eb1b0_1008 notebook 6.4.12 py_0 esri notebook-shim 0.1.0 py_0 esri ntlm-auth 1.4.0 py_0 esri numexpr 2.8.4 py39_2 esri numpy 1.22.4 py39_0 esri numpy-base 1.22.4 py39_0 esri oauthlib 3.2.0 py39_0 esri olefile 0.46 pyhd3eb1b0_0 openpyxl 3.0.10 py39h2bbff1b_0 openssl 3.0.10 0 esri orc 1.8.3 0 esri packaging 21.3 pyhd3eb1b0_0 pandas 2.0.2 py39_0 esri pandocfilters 1.5.0 pyhd3eb1b0_0 parso 0.8.3 pyhd3eb1b0_0 partd 1.2.0 pyhd3eb1b0_1 pathspec 0.9.0 py_0 esri patsy 0.5.3 py39haa95532_0 pefile 2022.5.30 pyhd8ed1ab_0 esri pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 9.5.0 py39_1 esri pip 23.2.1 py39haa95532_0 platformdirs 2.5.2 py39haa95532_0 pluggy 0.13.1 py39haa95532_0 pro_notebook_integration 3.2 py39_5 esri prometheus_client 0.8.0 py_0 esri prompt_toolkit 3.0.5 py_0 esri protobuf 3.21.12 py39_0 esri psutil 5.9.0 py39h2bbff1b_0 pure_eval 0.2.2 pyhd3eb1b0_0 pyarrow 12.0.0 py39_4 esri pybind11 2.10.4 1 esri pybind11_json 0.2.13 0 esri pycodestyle 2.8.0 pyhd3eb1b0_0 pycparser 2.21 pyhd3eb1b0_0 pyflakes 2.4.0 pyhd3eb1b0_0 pygments 2.14.0 py_0 esri pyjwt 2.4.0 py_1 esri pylerc 4.0 py_0 esri pyodbc 4.0.34 py39hd77b12b_0 pyopenssl 23.2.0 py39haa95532_0 pyparsing 3.0.9 py39haa95532_0 pypdf 3.15.0 py_1 esri pypdf2 1.26.0 py_4 esri pyrsistent 0.18.0 py39h196d8e1_0 pyshp 2.1.3 pyhd3eb1b0_0 pysocks 1.7.1 py39haa95532_0 pyspnego 0.8.0 py39h2bbff1b_2 pytest 7.2.0 py39_0 esri python 3.9.18 0 esri python-certifi-win32 1.6 py_0 esri python-dateutil 2.8.2 pyhd3eb1b0_0 python-fastjsonschema 2.16.2 py39haa95532_0 python-gssapi 1.8.2 py39_0 esri python_abi 3.9 1_cp39 esri pytz 2022.6 py39_0 esri pywin32-ctypes 0.2.0 py39_0 esri pywin32-security 306 py39_2 esri pywinpty 2.0.1 py39_0 esri pyyaml 6.0 py39h2bbff1b_1 pyzmq 25.0.2 py39_0 esri re2 2023.06.02 0 esri regex 2022.7.9 py39h2bbff1b_0 requests 2.31.0 py39haa95532_0 requests-gssapi 1.2.3 py_2 esri requests-kerberos 0.12.0 0 esri requests-negotiate-sspi 0.5.3 py39_0 esri requests-oauthlib 1.3.0 py_0 requests-toolbelt 1.0.0 py_0 esri ruamel.yaml 0.17.21 py39h2bbff1b_0 ruamel.yaml.clib 0.2.6 py39h2bbff1b_1 saspy 4.3.2 py_1 esri scipy 1.7.3 py39_3 esri seaborn 0.12.2 py39haa95532_0 send2trash 1.8.0 pyhd3eb1b0_1 setuptools 67.7.2 py39_0 esri six 1.16.0 py_0 esri snappy 1.1.10 0 esri sniffio 1.2.0 py39haa95532_1 sortedcontainers 2.4.0 pyhd3eb1b0_0 soupsieve 2.3.2.post1 py39haa95532_0 sqlalchemy 1.4.39 py39h2bbff1b_0 sqlite 3.41.2 0 esri stack_data 0.5.1 py_0 esri statsmodels 0.14.0 py39h9128911_0 swat 1.13.2 py39_0 esri sympy 1.9 py39_1 esri tblib 1.7.0 pyhd3eb1b0_0 terminado 0.13.1 py39haa95532_0 testpath 0.5.0 py_0 esri tinycss2 1.1.1 py_0 esri toml 0.10.2 pyhd3eb1b0_0 tomli 2.0.1 py39haa95532_0 toolz 0.11.2 pyhd3eb1b0_0 tornado 6.2 py39h2bbff1b_0 tqdm 4.64.1 py39haa95532_0 traitlets 5.5.0 py_0 esri typed-ast 1.4.3 py39h2bbff1b_1 typing-extensions 4.3.0 py39haa95532_0 typing_extensions 4.3.0 py39haa95532_0 tzdata 2023c h04d1e81_0 ujson 5.4.0 py39hd77b12b_0 urllib3 1.26.16 py39haa95532_0 vc 14.2 h21ff451_1 vs2015_runtime 14.27.29016 h5e58377_2 esri wcwidth 0.2.5 pyhd3eb1b0_0 webencodings 0.5.1 py39haa95532_1 websocket-client 0.58.0 py39haa95532_4 wheel 0.37.1 pyhd3eb1b0_0 widgetsnbextension 3.6.1 py_0 esri win_inet_pton 1.1.0 py39_0 esri wincertstore 0.2 py39haa95532_2 winkerberos 0.8.0 py39_0 esri winpty 0.4.3 4 wrapt 1.14.1 py39h2bbff1b_0 x86cpu 0.4 py39_1 esri xarray 2023.6.0 py39haa95532_0 xeus 3.0.5 0 esri xeus-python 0.15.8 0 esri xeus-zmq 1.0.2 0 esri xlrd 2.0.1 pyhd3eb1b0_1 xlwt 1.3.0 py39haa95532_0 xtl 0.7.5 0 esri xz 5.4.2 h8cc25b3_0 yaml 0.2.5 0 esri zeromq 4.3.4 1 esri zict 3.0.0 py_0 esri zipp 3.8.0 py39haa95532_0 zlib 1.2.13 0 esri zlib-ng 2.0.7 0 esri zstd 1.5.5 0 esriI've just removed |
Somewhat confusingly,
For our use case, it makes sense that we do something in the Package Manager part of Pro to do a full clean since the symbolic linking case isn't relevant for us (but is for conda more broadly). |
@scw That is very useful information. Thanks for that. I'll definitely take note of that. As you might have noticed, I do come from a Unix/Linux/Mac background. That's why I took that warning quite seriously and never considered that. It would be great to take that into account with the Package Manger (an option to "clear the cache" or so, that triggers this command). |
Describe the bug
Using very basic and simple conda commands, I wish to create a new "empty" environment (or even clone the original), but this fails with a DLL error, specifically:
ImportError: DLL load failed while importing etree: Kan opgegeven procedure niet vinden.
(FYI: "Kan opgegeven procedure niet vinden." (NL) = "Cannot find given procedure." (EN)).To Reproduce
Steps to reproduce the behavior:
error:
Maybe it is due to the version of arcpy (3.3) and ArcGIS Desktop Pro (3.2.2) that things do not work. Considering we have a licensing server that should enable using different versions, it might work???
Nonetheless, when I do the same for arcpy version 3.2 (which matches ArcGIS Desktop):
it again fails.
error:
I've also tried the following
giving the same DLL error.
gives a version conflict. Apparently, lxml < 5 is not accepted for arcpy 3.3 and above (I've tried arcpy=3.4 as well, despite the fact that ArcGIS Desktop 3.4 has not been released yet).
Trying to use the clone option in ArcGIS Desktop Pro itself, gives the following output (with errors; I have replaced the username with XXXXXXXXX):
Expected behavior
I expect that the installation finishes successfully without errors and that I can activate the created environment. If I try the command below:
This does seem to work and creates a working Python 3.9 environment with arcpy installed.
Hence, I come to the conclusion that there is something wrong with (the wheels? of) lxml > 5 (or underlying packages) from ESRI.
Funnily enough, when I use
conda-forge::lxml
, it still fails. Or am I missing something else completely fundamental? I did create regular environments without arcgis without any issues..condarc:
Platform (please complete the following information):
Additional context
Trying to do this in the context of ArcGIS Desktop Pro 3.2.2 (including the shipped conda environment, etc). I run this as user (I have no option to run this as admin).
I have also tried this after having run
conda clean -a
. That does not matter.The text was updated successfully, but these errors were encountered: