diff --git a/pythonnet/find_libpython/__init__.py b/pythonnet/find_libpython/__init__.py index 3ae28970e..91c066a52 100644 --- a/pythonnet/find_libpython/__init__.py +++ b/pythonnet/find_libpython/__init__.py @@ -91,6 +91,11 @@ def _linked_libpython_unix(): if retcode == 0: # means error return None path = os.path.realpath(dlinfo.dli_fname.decode()) + + # Compare basenames only, this should always be enough except for very + # pathological cases + if os.path.basename(path) == os.path.basename(os.path.realpath(sys.executable)): + return None return path
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: