spf13 / spf13-vim

The ultimate vim distribution
http://vim.spf13.com
Apache License 2.0
15.56k stars 3.64k forks source link

Question: pymode error, code signature in (~/env/startup-env/lib/python2.7/lib-dynload/_struct.so) not valid for use in process: mapped file ha s no cdhash, completely unsigned? Code has to be at least ad-hoc signed. #1093

Open billychou opened 5 years ago

billychou commented 5 years ago

Hi guys, I get some error messages when open python file. how to fix it? The message is below:

Error detected while processing /Users/qppzsc/.vim/bundle/python-mode/autoload/pymode/virtualenv.vim:
line    3:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/qppzsc/.vim/bundle/python-mode/pymode/virtualenv.py", line 7, in <module>
    from .environment import env
  File "/Users/qppzsc/.vim/bundle/python-mode/pymode/environment.py", line 5, in <module>
    import json
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 108, in <module>
    from .decoder import JSONDecoder
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 5, in <module>
    import struct
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/struct.py", line 1, in <module>
    from _struct import *
ImportError: dlopen(/Users/qppzsc/Work/env/startup-env/lib/python2.7/lib-dynload/_struct.so, 0x0002): code signature in (/Users/qppzsc/Work/env/startup-env/lib/python2.7/lib-dynload/_struct.so) not valid for use in process: mapped file ha
s no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
Error detected while processing function pymode#virtualenv#init:
line    5:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'enable_virtualenv' is not defined
Error detected while processing function pymode#breakpoint#init:
line   29:
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/Users/qppzsc/.vim/bundle/python-mode/pymode/libs/six.py", line 25, in <module>
    import functools
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/functools.py", line 10, in <module>
    from _functools import partial, reduce
ImportError: dlopen(/Users/qppzsc/Work/env/startup-env/lib/python2.7/lib-dynload/_functools.so, 0x0002): code signature in (/Users/qppzsc/Work/env/startup-env/lib/python2.7/lib-dynload/_functools.so) not valid for use in process: mapped f
ile has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
Error detected while processing /Users/qppzsc/.vim/bundle/python-mode/ftplugin/python/pymode.vim:
line   25:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/qppzsc/.vim/bundle/python-mode/pymode/utils.py", line 4, in <module>
    import threading
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 13, in <module>
    from collections import deque as _deque
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/collections.py", line 20, in <module>
    from _collections import deque, defaultdict
ImportError: dlopen(/Users/qppzsc/Work/env/startup-env/lib/python2.7/lib-dynload/_collections.so, 0x0002): code signature in (/Users/qppzsc/Work/env/startup-env/lib/python2.7/lib-dynload/_collections.so) not valid for use in process: mapp
ed file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 22 2019 18:22:38)
Included patches: 1-503, 505-680, 682-1283
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    -mouse_sgr       +tag_old_static
-arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           -mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     -termguicolors
-browse          -footer          +multi_byte      -terminal
+builtin_terms   +fork()          +multi_lang      +terminfo
+byte_offset     -gettext         -mzscheme        +termresponse
+channel         -hangul_input    +netbeans_intg   +textobjects
+cindent         +iconv           +num64           +timers
-clientserver    +insert_expand   +packages        +title
-clipboard       +job             +path_extra      -toolbar
+cmdline_compl   +jumplist        -perl            +user_commands
+cmdline_hist    -keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        -langmap         +printer         +visual
-conceal         +libcall         -profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             -rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
-emacs_tags      -mouseshape      +startuptime     -xpm
+eval            -mouse_dec       +statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
-farsi           -mouse_netterm   +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Cocoa
Sherry40931 commented 4 years ago

I got the same error, have you figured out how to fix it?