ModuleNotFoundError:没有名为'_sysconfigdata_x86_64_apple_darwin13_4_0'的模块

时间:2018-03-03 23:43:27

标签: python python-3.x macos python-2.x pyenv

错误

这是我得到的错误:

Failed to import the site module
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 544, in <module>
    main()
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 530, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 282, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 258, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 248, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 601, in get_config_var
    return get_config_vars().get(name)
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 550, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/sysconfig.py", line 421, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_x86_64_apple_darwin13_4_0'

我目前正在尝试运行this Github Project。

背景

我想同时使用Python2Python3。这是因为我的一些项目仍然使用Python2。为此,我按照网站here中的步骤进行操作。我接着这样做了:

enter image description here

为了更改到这个内核,我在根文件夹中做了一个简单的source activate py36。然后,我想通过调用python3 generate_chords.py运行一个库,但我得到上面的错误。

Python环境

版本说明:

(py36) ~/D/C/m/instrument-classification ❯❯❯ python --version
Python 2.7.14 :: Anaconda, Inc.
(py36) ~/D/C/m/instrument-classification ❯❯❯ python3 --version
Python 3.6.4

0 个答案:

没有答案