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: can't start Python3 due to ImportError of copy_reg
Type: behavior Stage: resolved
Components: Versions: Python 3.4
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: abaskm, r.david.murray
Priority: normal Keywords:

Created on 2015-05-26 14:55 by abaskm, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg244107 - (view) Author: Mike Basca (abaskm) Date: 2015-05-26 14:55
Hello,

I recently upgraded pip and pip3 and now I can't start python3.

This is the Traceback I receive when I started python 3.4.3 (python2.7.10 is fine).

localhost:PP4E Mike$ python3
Failed to import the site module
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site.py", line 562, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site.py", line 548, in main
    known_paths = addusersitepackages(known_paths)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site.py", line 281, in addusersitepackages
    user_site = getusersitepackages()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site.py", line 257, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site.py", line 247, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/sysconfig.py", line 589, in get_config_var
    return get_config_vars().get(name)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/sysconfig.py", line 568, in get_config_vars
    import _osx_support
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/_osx_support.py", line 4, in <module>
    import re
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/re.py", line 336, in <module>
    import copyreg
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/copyreg.py", line 3, in <module>
    from copy_reg import *
ImportError: No module named 'copy_reg'

Any help would be appreciated.
msg244108 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-05-26 15:00
copyreg.py is part of the standard library, but you obviously have a file shadowing it in your site-packages.  If this is a result of the pip upgrade, you should report this to the pip tracker.
History
Date User Action Args
2022-04-11 14:58:17adminsetgithub: 68477
2015-05-26 16:14:34zach.waresetcomponents: - 2to3 (2.x to 3.x conversion tool)
2015-05-26 15:00:52r.david.murraysetstatus: open -> closed

type: compile error -> behavior

nosy: + r.david.murray
messages: + msg244108
resolution: third party
stage: resolved
2015-05-26 14:55:39abaskmcreate