Skip to content
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

Running python.exe (v3.10) from a conda environment results in zlib.dll missing error #11072

Closed
4 tasks done
karthiknadig opened this issue Nov 30, 2021 · 12 comments
Closed
4 tasks done
Assignees
Labels
in-progress issue is actively being worked on locked [bot] locked due to inactivity os::windows relevant to Windows severity::1 blocker; broken functionality with no workaround source::partner created by or for an Anaconda, Inc. partner company sync::anaconda sync internally with Anaconda, Inc. ticket tracker type::bug describes erroneous operation, use severity::* to classify the type
Milestone

Comments

@karthiknadig
Copy link

karthiknadig commented Nov 30, 2021

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a solution or duplication
  • I already searched in Google and didn't find any good information or help
  • I looked at the docs and didn't see anything to help

What happened?

Create two environments:

conda create -p conda_py310 python=3.10
conda create -p conda_py39 python=3.9

with the python 3.9 environment you can execute python binary directly if needed. With the 3.10 environment you cannot.
image

Conda info

C:\GIT>conda info

     active environment : None
       user config file : C:\Users\Karthik Nadig\.condarc
 populated config files :
          conda version : 4.10.3
    conda-build version : not installed
         python version : 3.8.3.final.0
       virtual packages : __cuda=11.4=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\ProgramData\Miniconda3  (writable)
      conda av data dir : C:\ProgramData\Miniconda3\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:\ProgramData\Miniconda3\pkgs
                          C:\Users\Karthik Nadig\.conda\pkgs
                          C:\Users\Karthik Nadig\AppData\Local\conda\conda\pkgs
       envs directories : C:\ProgramData\Miniconda3\envs
                          C:\Users\Karthik Nadig\.conda\envs
                          C:\Users\Karthik Nadig\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.10.3 requests/2.26.0 CPython/3.8.3 Windows/10 Windows/10.0.19041
          administrator : True
             netrc file : None
           offline mode : False

Conda config

C:\GIT>conda config --show-sources


C:\GIT>

Conda list

C:\GIT>conda list --show-channel-urls
# packages in environment at C:\ProgramData\Miniconda3:
#
# Name                    Version                   Build  Channel
brotlipy                  0.7.0           py38h2bbff1b_1003    defaults
ca-certificates           2021.10.26           haa95532_2    defaults
certifi                   2021.10.8        py38haa95532_0    defaults
cffi                      1.15.0           py38h2bbff1b_0    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
conda                     4.10.3           py38haa95532_0    defaults
conda-package-handling    1.7.3            py38h8cc25b3_1    defaults
console_shortcut          0.1.1                         4    defaults
cryptography              35.0.0           py38h71e12ea_0    defaults
idna                      3.3                pyhd3eb1b0_0    defaults
menuinst                  1.4.16           py38he774522_0    defaults
openssl                   1.1.1l               h2bbff1b_0    defaults
pip                       21.2.2           py38haa95532_0    defaults
powershell_shortcut       0.0.1                         3    defaults
pycosat                   0.6.3            py38h2bbff1b_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pyopenssl                 21.0.0             pyhd3eb1b0_1    defaults
pysocks                   1.7.1            py38haa95532_0    defaults
python                    3.8.3                he1778fa_0    defaults
pywin32                   228              py38hbaba5e8_1    defaults
requests                  2.26.0             pyhd3eb1b0_0    defaults
ruamel_yaml               0.15.100         py38h2bbff1b_0    defaults
setuptools                58.0.4           py38haa95532_0    defaults
six                       1.16.0             pyhd3eb1b0_0    defaults
sqlite                    3.36.0               h2bbff1b_0    defaults
tqdm                      4.62.3             pyhd3eb1b0_1    defaults
urllib3                   1.26.7             pyhd3eb1b0_0    defaults
vc                        14.2                 h21ff451_1    defaults
vs2015_runtime            14.27.29016          h5e58377_2    defaults
wheel                     0.37.0             pyhd3eb1b0_1    defaults
win_inet_pton             1.1.0            py38haa95532_0    defaults
wincertstore              0.2              py38haa95532_2    defaults
yaml                      0.2.5                he774522_0    defaults

C:\GIT>

Additional Context

In the python extension for VS Code we try to get information about python binary by running a script using just the binary directly. This allows us to detect information about the environment, before we can figure out if it is conda based or venv based etc. This seems like a bug with the binary that is being shipped, since we can't execute scripts that don't depend on installed libraries.

@karthiknadig karthiknadig added the type::bug describes erroneous operation, use severity::* to classify the type label Nov 30, 2021
@brettcannon
Copy link
Contributor

Found out about this via microsoft/vscode-python#17941 .

@karthiknadig
Copy link
Author

Additional info, if you create an environment using conda-forge it seems to work as expected:

> conda create -p conda_py310cf --channel conda-forge python=3.10
> conda_py310cf\python.exe -c "print('hello world')"
hello world

The issue seems to be specific to environments created via default channel.

@kenodegard kenodegard added severity::3 major; broken functionality with a workaround source::community catch-all for issues filed by community members labels Nov 30, 2021
@kenodegard
Copy link
Contributor

This is probably related to the other Python 3.10 issues, see #10969, #10989, and #11005. These are all pending the upcoming 4.11.0 release.

cc @jezdez @chenghlee

@brettcannon
Copy link
Contributor

@kenodegard didn't 4.11.0 already come out? https://github.com/conda/conda/releases/tag/4.11.0

@kenodegard
Copy link
Contributor

kenodegard commented Nov 30, 2021

@brettcannon yes it's been tagged but a patch was necessary for conda-build (conda/conda-build#4333)

the new conda-build release was tagged earlier today (https://github.com/conda/conda-build/releases/tag/3.21.7) so we should see 4.11.0/4.11.1 in the defaults channel in the next day or so

@isuruf
Copy link
Contributor

isuruf commented Jan 9, 2022

@jezdez, @chenghlee, I think you forgot to port conda-forge/zlib-feedstock#51, conda-forge/zlib-feedstock#52 and conda-forge/zlib-feedstock#53 to defaults channel.

@jezdez
Copy link
Member

jezdez commented Jan 11, 2022

@isuruf Thanks for the pointer, I'll forward that to the packaging team.

@jezdez jezdez added os::windows relevant to Windows severity::1 blocker; broken functionality with no workaround source::partner created by or for an Anaconda, Inc. partner company and removed severity::3 major; broken functionality with a workaround source::community catch-all for issues filed by community members labels Jan 21, 2022
@jezdez jezdez added this to the Release TBD milestone Jan 21, 2022
@jezdez jezdez added the backlog issue has been triaged but has not been earmarked for any upcoming release label Jan 24, 2022
@chenghlee chenghlee added the sync::anaconda sync internally with Anaconda, Inc. ticket tracker label Feb 1, 2022
@jezdez jezdez modified the milestones: Release TBD, 4.12.0 Feb 3, 2022
@jezdez
Copy link
Member

jezdez commented Feb 22, 2022

As @chenghlee mentioned in a chat, we'll fix this by fixing the zlib package in a future update.

@jezdez jezdez modified the milestones: 4.12.0, Release TBD Mar 7, 2022
@CheeseMochi CheeseMochi added the in-progress issue is actively being worked on label Mar 21, 2022
@conda-bot conda-bot removed the backlog issue has been triaged but has not been earmarked for any upcoming release label Mar 21, 2022
@chenghlee
Copy link
Contributor

@karthiknadig @brettcannon Can you please try conda install zlib=1.2.11=*_5 in the appropriate environment? An updated zlib package is now available on Anaconda's defaults channel that should address this issue.

@brettcannon
Copy link
Contributor

I honestly don't have the environment lying around anymore, but maybe @karthiknadig does.

@karthiknadig
Copy link
Author

It works after installing zlib via conda install zlib=1.2.11=*_5 in that environment.

@chenghlee
Copy link
Contributor

Closing; updating to zlib=1.2.11[build_number>=5] is considered the fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in-progress issue is actively being worked on locked [bot] locked due to inactivity os::windows relevant to Windows severity::1 blocker; broken functionality with no workaround source::partner created by or for an Anaconda, Inc. partner company sync::anaconda sync internally with Anaconda, Inc. ticket tracker type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

No branches or pull requests

8 participants