conda / conda

A system-level, binary package and environment manager running on all major operating systems and platforms.
https://docs.conda.io/projects/conda/
Other
6.44k stars 1.68k forks source link

After updating conda environment, Python 3.8 seems corrupted (procedure entry point in pythoncom38.dll missing) #10926

Closed 1kastner closed 10 months ago

1kastner commented 3 years ago

Checklist

What happened?

From time to time, this popup window appears. Everything else seems to work but the popup window is worrisome.

grafik

Conda info

active environment : ml-potentials-and-risks
    active env location : C:\Users\cmk3624\Anaconda3\envs\ml-potentials-and-risks
            shell level : 2
       user config file : C:\Users\cmk3624\.condarc
 populated config files : C:\Users\cmk3624\.condarc
          conda version : 4.10.3
    conda-build version : 3.21.4
         python version : 3.8.10.final.0
       virtual packages : __cuda=11.2=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\cmk3624\Anaconda3  (writable)
      conda av data dir : C:\Users\cmk3624\Anaconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\cmk3624\Anaconda3\pkgs
                          C:\Users\cmk3624\.conda\pkgs
                          C:\Users\cmk3624\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\cmk3624\Anaconda3\envs
                          C:\Users\cmk3624\.conda\envs
                          C:\Users\cmk3624\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.10.3 requests/2.26.0 CPython/3.8.10 Windows/10 Windows/10.0.19042
          administrator : False
             netrc file : None
           offline mode : False

Note: you may need to restart the kernel to use updated packages.

Conda config

==> C:\Users\cmk3624\.condarc <==
auto_activate_base: False
channels:
  - defaults

Note: you may need to restart the kernel to use updated packages.

Conda list

# packages in environment at C:\Users\cmk3624\Anaconda3\envs\ml-potentials-and-risks:
#
# Name                    Version                   Build  Channel
anyio                     3.3.0            py38haa244fe_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argon2-cffi               20.1.0           py38h294d835_2    conda-forge
astroid                   2.8.0            py38haa244fe_0    conda-forge
async_generator           1.10                       py_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
autopep8                  1.5.5                    pypi_0    pypi
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.0               h0e60522_0    conda-forge
branca                    0.4.2              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py38h294d835_1001    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.5.30            h5b45459_0    conda-forge
certifi                   2021.5.30        py38haa244fe_0    conda-forge
cffi                      1.14.6           py38hd8c33c5_1    conda-forge
cfitsio                   3.470                h0af3d06_7    conda-forge
chardet                   4.0.0            py38haa244fe_1    conda-forge
charls                    2.2.0                h39d44d4_0    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              3.4.7            py38hd7da0ea_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
cytoolz                   0.11.0           py38h294d835_3    conda-forge
dask-core                 2021.9.0           pyhd8ed1ab_0    conda-forge
decorator                 5.1.0              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
docstring-to-markdown     0.9                      pypi_0    pypi
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
flake8                    3.8.4                    pypi_0    pypi
folium                    0.12.0             pyhd8ed1ab_1    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
fsspec                    2021.8.1           pyhd8ed1ab_0    conda-forge
giflib                    5.2.1                h8d14728_2    conda-forge
git                       2.33.0               h57928b3_0    conda-forge
icu                       68.1                 h0e60522_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
imagecodecs               2021.7.30        py38hc88f965_0    conda-forge
imageio                   2.9.0                      py_0    conda-forge
importlib-metadata        4.8.1            py38haa244fe_0    conda-forge
intel-openmp              2021.3.0          h57928b3_3372    conda-forge
ipykernel                 5.5.5            py38h43734a8_0    conda-forge
ipython                   7.27.0           py38h595d716_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     5.9.3              pyhd8ed1ab_0    conda-forge
jdcal                     1.4.1                      py_0    conda-forge
jedi                      0.17.2                   pypi_0    pypi
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h8ffe710_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter-lsp               1.4.1              pyhd8ed1ab_0    conda-forge
jupyter_client            7.0.3              pyhd8ed1ab_0    conda-forge
jupyter_core              4.8.1            py38haa244fe_0    conda-forge
jupyter_server            1.11.0             pyhd8ed1ab_0    conda-forge
jupyterlab                3.1.12             pyhd8ed1ab_0    conda-forge
jupyterlab-lsp            3.8.1              pyhd8ed1ab_0    conda-forge
jupyterlab-spellchecker   0.7.1              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.8.1              pyhd8ed1ab_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
kiwisolver                1.3.2            py38hbd9d945_0    conda-forge
lazy-object-proxy         1.6.0            py38h294d835_0    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      2.2.1                h0e60522_0    conda-forge
libaec                    1.0.5                h39d44d4_0    conda-forge
libblas                   3.9.0              11_win64_mkl    conda-forge
libbrotlicommon           1.0.9                h8ffe710_5    conda-forge
libbrotlidec              1.0.9                h8ffe710_5    conda-forge
libbrotlienc              1.0.9                h8ffe710_5    conda-forge
libcblas                  3.9.0              11_win64_mkl    conda-forge
libclang                  11.1.0          default_h5c34c98_1    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
liblapack                 3.9.0              11_win64_mkl    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libtiff                   4.3.0                h0c97f57_0    conda-forge
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
locket                    0.2.0                      py_2    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                2.0.1            py38h294d835_0    conda-forge
matplotlib                3.4.3            py38haa244fe_0    conda-forge
matplotlib-base           3.4.3            py38h1f000d6_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py38h294d835_1004    conda-forge
mkl                       2021.3.0           hb70f87d_564    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
mypy                      0.910                    pypi_0    pypi
mypy-extensions           0.4.3                    pypi_0    pypi
nb_conda_kernels          2.3.1            py38haa244fe_0    conda-forge
nbclassic                 0.3.2              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.4              pyhd8ed1ab_0    conda-forge
nbconvert                 6.1.0            py38haa244fe_1    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
networkx                  2.5                        py_0    conda-forge
notebook                  6.4.4              pyha770c72_0    conda-forge
numpy                     1.21.2           py38h089cfbf_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openpyxl                  3.0.8              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.0               pyhd8ed1ab_0    conda-forge
pandas                    1.3.3            py38h5d928e2_0    conda-forge
pandoc                    2.14.2               h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.7.1                    pypi_0    pypi
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.3.2            py38h794f750_0    conda-forge
pip                       21.2.4             pyhd8ed1ab_0    conda-forge
platformdirs              2.3.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.0.0                    pypi_0    pypi
pooch                     1.5.1              pyhd8ed1ab_0    conda-forge
prometheus_client         0.11.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.20             pyha770c72_0    conda-forge
pycodestyle               2.6.0                    pypi_0    pypi
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pydocstyle                6.1.1                    pypi_0    pypi
pyflakes                  2.2.0                    pypi_0    pypi
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pylint                    2.11.1             pyhd8ed1ab_0    conda-forge
pyls-flake8               0.4.0                    pypi_0    pypi
pylsp-mypy                0.5.2                    pypi_0    pypi
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyqt                      5.12.3           py38h7ae7562_4    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtchart                 5.12                     pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
pyrsistent                0.17.3           py38h294d835_2    conda-forge
pysocks                   1.7.1            py38haa244fe_3    conda-forge
python                    3.8.12          h7840368_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-jsonrpc-server     0.4.0                    pypi_0    pypi
python-language-server    0.36.2+49.g3536061          pypi_0    pypi
python-lsp-jsonrpc        1.0.0                    pypi_0    pypi
python-lsp-server         1.2.2                    pypi_0    pypi
python_abi                3.8                      2_cp38    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pywavelets                1.1.1            py38h6f4d8f0_3    conda-forge
pywin32                   301              py38h294d835_0    conda-forge
pywinpty                  1.1.4            py38hd3f51b4_0    conda-forge
pyyaml                    5.4.1            py38h294d835_1    conda-forge
pyzmq                     22.3.0           py38h09162b1_0    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
requests-unixsocket       0.2.0                      py_0    conda-forge
rope                      0.20.0                   pypi_0    pypi
scikit-image              0.18.3           py38h5d928e2_0    conda-forge
scikit-learn              0.24.2           py38h8224a6f_1    conda-forge
scipy                     1.7.1            py38ha1292f7_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                58.0.4           py38haa244fe_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
sniffio                   1.2.0            py38haa244fe_1    conda-forge
snowballstemmer           2.1.0                    pypi_0    pypi
sqlite                    3.36.0               h8ffe710_1    conda-forge
tbb                       2021.3.0             h2d74725_0    conda-forge
terminado                 0.12.1           py38haa244fe_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
threadpoolctl             2.2.0              pyh8a188c0_0    conda-forge
tifffile                  2021.8.30          pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
toolz                     0.11.1                     py_0    conda-forge
tornado                   6.1              py38h294d835_1    conda-forge
traitlets                 5.1.0              pyhd8ed1ab_0    conda-forge
typing-extensions         3.10.0.0             hd8ed1ab_0    conda-forge
typing_extensions         3.10.0.0           pyha770c72_0    conda-forge
tzdata                    2021a                he74cb21_1    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
ujson                     4.1.0                    pypi_0    pypi
urllib3                   1.26.6             pyhd8ed1ab_0    conda-forge
vc                        14.2                 hb210afc_5    conda-forge
vs2015_runtime            14.29.30037          h902a5da_5    conda-forge
watermark                 2.2.0                    pypi_0    pypi
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          0.57.0           py38haa244fe_4    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
win_inet_pton             1.1.0            py38haa244fe_2    conda-forge
winpty                    0.4.3                         4    conda-forge
wrapt                     1.12.1           py38h294d835_3    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
yapf                      0.31.0                   pypi_0    pypi
zeromq                    4.3.4                h0e60522_1    conda-forge
zfp                       0.5.5                h0e60522_6    conda-forge
zipp                      3.5.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h62dcd97_1010    conda-forge
zstd                      1.5.0                h6255e5f_0    conda-forge

Additional Context

No response

1kastner commented 3 years ago

The text in the window roughly translated to:

Procedure entry point could not be located for pythoncom38.dll

The entry point is ?init@PyWinBufferView@@QEAA_NPEAU_object@@_N1@Z

The path to the pythoncom38.dll file should be self-explanatory.

The popup shows up every maybe 5 minutes while I use JuypterLab. There is no link between me running any code and the popup. It even shows up when I am doing something else, e.g. sharing PowerPoint slides. As long as I don't close the popup window, the execution of a cell in a Jupyter Notebook stops. Once I click on "ok", the execution continues. We talk abour arbitrary Python code here, e.g. The output looks as expected, so the error message is rather annoying than helpful.

1kastner commented 3 years ago

This sporadically appearing error message continued to show up even after I removed my previous Anaconda version and freshly installed the latest one available for download on the official side. Further information on my conda environment can be found at https://github.com/1kastner/ml-potentials-and-risks, the environment is described in https://github.com/1kastner/ml-potentials-and-risks/blob/master/environment.yml.

1kastner commented 3 years ago

I set up another conda environment with a different set of libraries and the general issue persisted.

SvenSchiffner commented 3 years ago

I face the same issue with python 3.9 with exactly the same error message on my two machines with the same environment. A downgrade to 3.8 fixed the issue for me. I read somewhere that this can occur if you have different patch versions of python installed in the environments, because the pythoncom*.dll is shared between the environments. But if I force all my environments to 3.9.7 the issue still occurs.

1kastner commented 3 years ago

Thanks for the hint, @sven5s. Do you have a source where the patch issue is better described? Additionally I found https://stackoverflow.com/questions/68925724/anaconda-environment-error-procedure-entry-point-could-not-be-located-for-pyth and the error message looks very similar. Also I use nb_conda_kernels in my environment. Are they indirectly the culprit? I dont want to download a dll file from a third-party webpage (as suggested on stackoverflow) so I tried to copy trick. However, my W10 didn't allow me to overwrite the pythoncom38.dll file for some unspecified reason.

1kastner commented 3 years ago

I deleted the dll and for now everything seems running peacefully. A weird behavior indeed.

SvenSchiffner commented 3 years ago

I found the same link and also this two. Maybe my conclusion was not correct but it was the right direction.
I solved my issue. The problem was that miniconda used python from anaconda repo and my jupyter environment used the conda-forge repo. Now the activation of the jupyter environment was not working correctly in the cmd and so also in my self created shortcut. I could run the jupyter exectuable but the pythoncom*.dll from the base environment was used. Now I use conda run and everything works.

1kastner commented 3 years ago

Well, they seem related (definitely right direction) but not exactly the same. So thanks again! However, I hope this issue can be solved professionally so that the next user doesn't need to go through this.

carloocchiena commented 2 years ago

Hi there. Having the same issue after updating my Anaconda to

conda version : 4.11.0
conda-build version : 3.21.4
python version : 3.8.8.final.0

This error message pop-up as a Windows error message, exactly as @1kastner posted. Tried to reinstall or replace the dll file but with no avail. thanks!

1kastner commented 2 years ago

As described in https://github.com/conda/conda/issues/10926#issuecomment-928974593, by deleting the file it was solved. Currently I just rename the pythoncom38.dll to pythoncom38.dll.bak (just in case) and afterwards the pop-ups immediately stop.

carloocchiena commented 2 years ago

This does not work for me. The warning from Anaconda Prompt is gone, but I have again the same as soon as I open any Jupyter Notebook.

I can confirm I renamed the pythoncom38.dll to a _bk version.

image

edit: actually removing the .dll file make it worse, since the popup appear everytime I refresh the kernel; otherwise, leaving "as is" it "just" appears launching JN from Anaconda Prompt.

apachaves commented 2 years ago

Just for info, I'm having the same issue now that I upgraded the Python version to 3.10 from 3.9.

apachaves commented 2 years ago

Quick update, my problem seem to have disappeared.

My actions:

Once I removed the old environment, Jupyter Lab complained about the lack of kernel, so I had to reinstall it, but this seems to have worked fine.

christianrickert commented 1 year ago

Ran into the same issue after running conda update --all

image

Removing the corresponding library solved the issue:

image

I have the suspicion that the offending library originates from previous Python versions installed/uninstalled by the official Windows installers.

github-actions[bot] commented 11 months ago

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!