This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: On MacOSX with 3.7 python getting "Symbol not found: _PyString_AsString"
Type: behavior Stage: resolved
Components: macOS Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, ronaldoussoren, therk
Priority: normal Keywords:

Created on 2018-09-26 12:02 by therk, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg326451 - (view) Author: Ruslan Kharitonov (therk) Date: 2018-09-26 12:02
Getting the following error on MacOSX after installing Python 3.7.0 from the Python download. Also, tried installing from brew.

➜  ~ python3
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from bin.test import *
>>> help(fetch_words)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_sitebuiltins.py", line 102, in __call__
    import pydoc
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pydoc.py", line 66, in <module>
    import platform
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/platform.py", line 116, in <module>
    import sys, os, re, subprocess
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 139, in <module>
    import _posixsubprocess
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_posixsubprocess.so, 2): Symbol not found: _PyString_AsString
  Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_posixsubprocess.so
  Expected in: flat namespace
 in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_posixsubprocess.so
msg326452 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2018-09-26 12:05
Do you have a $PYTHONPATH in your environment?

For some reason the 3.7 install is looking in the site-packages directory for the 2.7 install. This is probably configuration on your system.
msg326454 - (view) Author: Ruslan Kharitonov (therk) Date: 2018-09-26 12:10
Yes, this was the issue. Thank you.

> On Sep 26, 2018, at 8:05 AM, Ronald Oussoren <report@bugs.python.org> wrote:
> 
> 
> Ronald Oussoren <ronaldoussoren@mac.com> added the comment:
> 
> Do you have a $PYTHONPATH in your environment?
> 
> For some reason the 3.7 install is looking in the site-packages directory for the 2.7 install. This is probably configuration on your system.
> 
> ----------
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue34809>
> _______________________________________
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 78990
2018-09-26 13:44:56zach.waresetstatus: open -> closed
type: crash -> behavior
resolution: not a bug
stage: resolved
2018-09-26 12:10:39therksetmessages: + msg326454
2018-09-26 12:05:15ronaldoussorensetmessages: + msg326452
2018-09-26 12:03:25therksettype: crash
2018-09-26 12:02:56therkcreate