1

Итак, у меня есть некоторый код в Matlab, который вызывает функции из модуля Python scikit-learn. Проблема в том, что когда я пытаюсь использовать Python 2.7 в виртуальной среде, созданной через Anaconda, он завершается с ошибкой сегментации. Этого не происходит с виртуальной средой Python 3.7, созданной с помощью Anaconda. Трассировка стека выглядит следующим образом:

------------------------------------------------------------------------
       Segmentation violation detected at Thu Jan 24 15:59:14 2019
------------------------------------------------------------------------

Configuration:
  Crash Decoding      : Disabled - No sandbox or build area path
  Crash Mode          : continue (default)
  Current Graphics Driver: Unknown hardware 
  Current Visual      : 0x21 (class 4, depth 24)
  Default Encoding    : UTF-8
  Deployed            : false
  GNU C Library       : 2.28 stable
  Host Name           : h110
  MATLAB Architecture : glnxa64
  MATLAB Entitlement ID: 6257193
  MATLAB Root         : /run/media/mahieyin/STUFF/ProgramFiles/MATLAB/R2017a
  MATLAB Version      : 9.2.0.538062 (R2017a)
  OpenGL              : hardware
  Operating System    : Linux 4.19.14-1-MANJARO #1 SMP PREEMPT Wed Jan 9 17:17:37 UTC 2019 x86_64
  Processor ID        : x86 Family 6 Model 94 Stepping 3, GenuineIntel
  Virtual Machine     : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  Window System       : The X.Org Foundation (12003000), display :0

Fault Count: 1


Abnormal termination:
Segmentation violation

Register State (from fault):
  RAX = 0000000000000000  RBX = 00007f21e0bb2fa0
  RCX = 0000000000000100  RDX = 0000000000000000
  RSP = 00007f227bb2a698  RBP = 0000000001003f00
  RSI = 0000000000000000  RDI = 0000000000000000

   R8 = 0000000000000100   R9 = 00000000010267b0
  R10 = 000000000000000e  R11 = 000000000000000f
  R12 = 0000000000000002  R13 = 00000000010256c8
  R14 = 00007f21e0d51bd0  R15 = 00007f2293355850

  RIP = 00007f229c166c1e  EFL = 0000000000010283

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007f229c166c1e                                 /usr/lib/libc.so.6+01420318
[  1] 0x00007f22933f642d /run/media/mahieyin/STUFF/ProgramFiles/MATLAB/R2017a/bin/glnxa64/libcrypto.so.1.0.0+01106989 lh_insert+00000173
[  2] 0x00007f2293355c95 /run/media/mahieyin/STUFF/ProgramFiles/MATLAB/R2017a/bin/glnxa64/libcrypto.so.1.0.0+00449685 OBJ_NAME_add+00000101
[  3] 0x00007f21b23638cd /home/mahieyin/.conda/envs/py27/lib/python2.7/lib-dynload/_hashlib.so+00923853 openssl_add_all_ciphers_int+00000829
[  4] 0x00007f21b231284a /home/mahieyin/.conda/envs/py27/lib/python2.7/lib-dynload/_hashlib.so+00591946
[  5] 0x00007f229c1df4ff                           /usr/lib/libpthread.so.0+00062719
[  6] 0x00007f21b232677a /home/mahieyin/.conda/envs/py27/lib/python2.7/lib-dynload/_hashlib.so+00673658 CRYPTO_THREAD_run_once+00000010
[  7] 0x00007f21b2312eac /home/mahieyin/.conda/envs/py27/lib/python2.7/lib-dynload/_hashlib.so+00593580 OPENSSL_init_crypto+00000572
[  8] 0x00007f21b230bde2 /home/mahieyin/.conda/envs/py27/lib/python2.7/lib-dynload/_hashlib.so+00564706 init_hashlib+00000034
[  9] 0x00007f21b379418e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01024398 _PyImport_LoadDynamicModule+00000158
[ 10] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 11] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 12] 0x00007f21b3792e8c /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019532 PyImport_ImportModuleLevel+00000188
[ 13] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 14] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 15] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 16] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 17] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 18] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 19] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 20] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[ 21] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 22] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 23] 0x00007f21b3792e8c /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019532 PyImport_ImportModuleLevel+00000188
[ 24] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 25] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 26] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 27] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 28] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 29] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 30] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 31] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[ 32] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 33] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 34] 0x00007f21b3792e8c /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019532 PyImport_ImportModuleLevel+00000188
[ 35] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 36] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 37] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 38] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 39] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 40] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 41] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 42] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[ 43] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 44] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 45] 0x00007f21b3792e8c /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019532 PyImport_ImportModuleLevel+00000188
[ 46] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 47] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 48] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 49] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 50] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 51] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 52] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 53] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[ 54] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 55] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 56] 0x00007f21b3792ecc /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019596 PyImport_ImportModuleLevel+00000252
[ 57] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 58] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 59] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 60] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 61] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 62] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 63] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 64] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[ 65] 0x00007f21b3792b1f /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01018655
[ 66] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 67] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 68] 0x00007f21b3792ecc /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019596 PyImport_ImportModuleLevel+00000252
[ 69] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 70] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 71] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 72] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 73] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 74] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 75] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 76] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[ 77] 0x00007f21b3792b1f /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01018655
[ 78] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 79] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 80] 0x00007f21b3792ecc /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019596 PyImport_ImportModuleLevel+00000252
[ 81] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 82] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 83] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 84] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 85] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 86] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 87] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 88] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[ 89] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[ 90] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[ 91] 0x00007f21b3792e8c /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019532 PyImport_ImportModuleLevel+00000188
[ 92] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[ 93] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[ 94] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[ 95] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[ 96] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[ 97] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[ 98] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[ 99] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[100] 0x00007f21b3792b1f /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01018655
[101] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[102] 0x00007f21b3792578 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017208
[103] 0x00007f21b3792ecc /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019596 PyImport_ImportModuleLevel+00000252
[104] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[105] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[106] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[107] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[108] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[109] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[110] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[111] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[112] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[113] 0x00007f21b3792899 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01018009
[114] 0x00007f21b3792f5d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019741 PyImport_ImportModuleLevel+00000397
[115] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126
[116] 0x00007f21b36e5973 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00309619 PyObject_Call+00000067
[117] 0x00007f21b3777c38 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00908344 PyEval_CallObjectWithKeywords+00000072
[118] 0x00007f21b377d638 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00931384 PyEval_EvalFrameEx+00021672
[119] 0x00007f21b37816c9 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00947913 PyEval_EvalCodeEx+00002025
[120] 0x00007f21b37818ea /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00948458 PyEval_EvalCode+00000026
[121] 0x00007f21b379141e /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01012766 PyImport_ExecCodeModuleEx+00000174
[122] 0x00007f21b379169d /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01013405
[123] 0x00007f21b3792b1f /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01018655
[124] 0x00007f21b3792323 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01016611
[125] 0x00007f21b379262a /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01017386
[126] 0x00007f21b3792e8c /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+01019532 PyImport_ImportModuleLevel+00000188
[127] 0x00007f21b3776006 /home/mahieyin/.conda/envs/py27/lib/libpython2.7.so+00901126


If this problem is reproducible, please submit a Service Request via:
    http://www.mathworks.com/support/contact_us/

A technical support engineer might contact you with further information.

Thank you for your help.

Похоже, я не могу найти подобных проблем в Интернете, извинения, если это известная проблема или неправильное сообщение на форуме. Кроме того, причина спрашивать об этом, когда он работает с Python 3.7, состоит в том, чтобы выяснить основную причину и исправить ее, чтобы я мог легко использовать любую версию Python. Ты заранее.

0