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

Bug with Miniforge3-MacOSX-x86_64, MacOS11, Wrong Compatible tags #445

Closed
gutsyy opened this issue Feb 5, 2021 · 14 comments
Closed

Bug with Miniforge3-MacOSX-x86_64, MacOS11, Wrong Compatible tags #445

gutsyy opened this issue Feb 5, 2021 · 14 comments

Comments

@gutsyy
Copy link

gutsyy commented Feb 5, 2021

Issue:
Wront Compatible Tags
Test:
Python 3.8 from the system:

/usr/bin/python3 -c "import platform; print(platform.platform())"
macOS-11.0.1-x86_64-i386-64bit

Python 3.9 installed with homebrew:

/usr/local/bin/python3 -c "import platform; print(platform.platform())"
macOS-11.0.1-x86_64-i386-64bit

Python 3.8 from a conda-forge env:

/Users/ogrisel/miniforge3/envs/py38/bin/python -c "import platform; print(platform.platform())"
macOS-10.16-x86_64-i386-64bit

So conda-forge's Python is indeed pretending to be installed on a fake 10.16 version of macOS to bypass this problem with pip 20.2.4


How to fix that? Thanks a lot.
@isuruf isuruf transferred this issue from conda-forge/miniforge Feb 5, 2021
@mwidjaja1
Copy link

For situational awareness, I think this is not necessarily a bug with Miniforge but it could be Conda's Python as a whole. I get this same 'issue' on Anaconda where a Python interpreter for Intel macOS 11.2 is considered 10_16 where as on an Apple Silicon macOS 11.2, it's 11_0.

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

Can you confirm that python 3.9 works fine?

@mwidjaja1
Copy link

@isuruf For me (admittedly I'm using Anaconda), Python 3.9 does not work fine

python --version
Python 3.9.1

which python
/Users/matthew/opt/anaconda3/envs/test/bin/python

python  -c "import platform; print(platform.platform())"
macOS-10.16-x86_64-i386-64bit

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

can you try conda-forge?

@mwidjaja1
Copy link

@isuruf Sure, same effect

~/miniforge3/bin/python -c "import platform; print(platform.platform())"
macOS-10.16-x86_64-i386-64bit

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

Can you show conda info?

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

and conda list?

@gutsyy
Copy link
Author

gutsyy commented Feb 5, 2021

  • conda info
     active environment : base
    active env location : /Users/gyuannn/miniforge3
            shell level : 1
       user config file : /Users/gyuannn/.condarc
 populated config files : /Users/gyuannn/miniforge3/.condarc
          conda version : 4.9.2
    conda-build version : not installed
         python version : 3.8.6.final.0
       virtual packages : __osx=10.16=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/gyuannn/miniforge3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/gyuannn/miniforge3/pkgs
                          /Users/gyuannn/.conda/pkgs
       envs directories : /Users/gyuannn/miniforge3/envs
                          /Users/gyuannn/.conda/envs
               platform : osx-64
             user-agent : conda/4.9.2 requests/2.25.1 CPython/3.8.6 Darwin/20.3.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False
  • conda list
# packages in environment at /Users/gyuannn/miniforge3:
#
# Name                    Version                   Build  Channel
brotlipy                  0.7.0           py38h94c058a_1001    conda-forge
bzip2                     1.0.8                hc929b4f_4    conda-forge
ca-certificates           2020.12.5            h033912b_0    conda-forge
certifi                   2020.12.5        py38h50d1736_0    conda-forge
cffi                      1.14.4           py38h979bc6b_1    conda-forge
chardet                   4.0.0            py38h50d1736_0    conda-forge
conda                     4.9.2            py38h50d1736_0    conda-forge
conda-package-handling    1.7.2            py38h94c058a_0    conda-forge
cryptography              3.3.1            py38h6b4ec92_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
libcxx                    11.0.0               h4c3b8ed_1    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
openssl                   1.1.1i               h35c211d_0    conda-forge
pip                       20.3.3             pyhd8ed1ab_0    conda-forge
pycosat                   0.6.3           py38h94c058a_1005    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1            py38h5347e94_2    conda-forge
python                    3.8.6           h624753d_4_cpython    conda-forge
python_abi                3.8                      1_cp38    conda-forge
readline                  8.0                  h0678c8f_2    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
ruamel_yaml               0.15.80         py38h94c058a_1003    conda-forge
setuptools                49.6.0           py38h5347e94_2    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
sqlite                    3.34.0               h17101e1_0    conda-forge
tk                        8.6.10               h0419947_1    conda-forge
tqdm                      4.55.0             pyhd8ed1ab_0    conda-forge
urllib3                   1.26.2             pyhd8ed1ab_0    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
yaml                      0.2.5                haf1e3a3_0    conda-forge
zlib                      1.2.11            h7795811_1010    conda-forge

ps:my system is MacOS11.2

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

Can you try creating a python=3.9 env, confirm the bug exists there and show conda list?

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

Also what do you get with platform.uname()?

@gutsyy
Copy link
Author

gutsyy commented Feb 5, 2021

env python=3.9

  • conda list
(3.9) gyuannn@gongyuandeMacBook-Pro ~ % conda list
# packages in environment at /Users/gyuannn/miniforge3/envs/3.9:
#
# Name                    Version                   Build  Channel
ca-certificates           2020.12.5            h033912b_0    conda-forge
certifi                   2020.12.5        py39h6e9494a_1    conda-forge
libcxx                    11.0.1               habf9029_0    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
openssl                   1.1.1i               h35c211d_0    conda-forge
pip                       21.0.1             pyhd8ed1ab_0    conda-forge
python                    3.9.1           h2502468_5_cpython    conda-forge
python_abi                3.9                      1_cp39    conda-forge
readline                  8.0                  h0678c8f_2    conda-forge
setuptools                49.6.0           py39h6e9494a_3    conda-forge
sqlite                    3.34.0               h17101e1_0    conda-forge
tk                        8.6.10               h0419947_1    conda-forge
tzdata                    2021a                he74cb21_0    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zlib                      1.2.11            h7795811_1010    conda-forge
  • conda info
(3.9) gyuannn@gongyuandeMacBook-Pro ~ % conda info

     active environment : 3.9
    active env location : /Users/gyuannn/miniforge3/envs/3.9
            shell level : 2
       user config file : /Users/gyuannn/.condarc
 populated config files : /Users/gyuannn/miniforge3/.condarc
          conda version : 4.9.2
    conda-build version : not installed
         python version : 3.8.6.final.0
       virtual packages : __osx=10.16=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/gyuannn/miniforge3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/gyuannn/miniforge3/pkgs
                          /Users/gyuannn/.conda/pkgs
       envs directories : /Users/gyuannn/miniforge3/envs
                          /Users/gyuannn/.conda/envs
               platform : osx-64
             user-agent : conda/4.9.2 requests/2.25.1 CPython/3.8.6 Darwin/20.3.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False
  • platform.uname()
(3.9) gyuannn@gongyuandeMacBook-Pro ~ % python -c "import platform; print(platform.platform())"
macOS-11.2-x86_64-i386-64bit

I think python=3.9 env Compatible tags is right. The problem is python=3.8 env. Some .whl release only have python38 compatible tags, maybe download the .whl and rename _cp38_cp38_macosx_11_0 to _cp38_cp38_macosx_10_16 can fix that.

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

Thanks for the info. This is a upstream issue if python is built with SDK < 11.0 and used with Big Sur. See release note at https://www.python.org/downloads/release/python-387/ about 3.8.7 not fully supporting Big Sur.

You'll have to backport the PR python/cpython#23295 to 3.8 branch in cpython.

@isuruf
Copy link
Member

isuruf commented Feb 5, 2021

To workaround this, do export SYSTEM_VERSION_COMPAT=0 before running python

@gutsyy
Copy link
Author

gutsyy commented Feb 5, 2021

To workaround this, do export SYSTEM_VERSION_COMPAT=0 before running python

Thank u lot. It works fine!

@gutsyy gutsyy closed this as completed Feb 5, 2021
andrey-khropov added a commit to andrey-khropov/catboost-feedstock that referenced this issue May 2, 2023
There're strange issues with it conda-forge/python-feedstock#445 and Conda reports incompatible platform tags in tests.
andrey-khropov added a commit to andrey-khropov/catboost-feedstock that referenced this issue May 2, 2023
There are issues with python 3.8 on macOS 11.x: conda-forge/python-feedstock#445 
  so Conda has issues with tags compatibility with platform tags 'macosx_11_0_...'
  so disable this configuration for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants