Skip to content

sysconfig.get_config_var('INSTSONAME') get wrong library path #92794

Closed as not planned
@awfeequdng

Description

@awfeequdng

Bug report

  • I get a wrong python library through sysconfig.get_config_var('INSTSONAME'), the result is 'Python.framework/Versions/3.9/Python'
  • details as follow:
>>> import sysconfig
>>> sysconfig.get_config_var('LIBDIR')
'/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib'
>>> sysconfig.get_config_var('INSTSONAME')
'Python.framework/Versions/3.9/Python'

but I can not find the library: /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/Python.framework/Versions/3.9/Python

  • the true python lib path is as follow:
$ ll /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib
/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib -> ../Python

$ ll /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/Python
/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/Python


Your environment

  • CPython versions tested on: Python 3.9.4
  • Operating system and architecture: Darwin Kernel Version 19.6.0: RELEASE_X86_64 x86_64

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-macbuildThe build process and cross-buildpendingThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions