Skip to content

Linux: cannot find function PyEval_ThreadsInitialized in module ffi #147

@Ploppz

Description

@Ploppz

Arch Linux.

I get these errors:

error[E0425]: cannot find function `PyEval_ThreadsInitialized` in module `ffi`
  --> /home/ploppz/.cargo/git/checkouts/rust-cpython-3cf10c007238aed2/ed21cf1/src/pythonrun.rs:55:26
   |
55 |             assert!(ffi::PyEval_ThreadsInitialized() != 0);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `ffi`

error[E0425]: cannot find function `PyEval_ThreadsInitialized` in module `ffi`
  --> /home/ploppz/.cargo/git/checkouts/rust-cpython-3cf10c007238aed2/ed21cf1/src/pythonrun.rs:58:26
   |
58 |             assert!(ffi::PyEval_ThreadsInitialized() == 0);
   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `ffi`

error[E0425]: cannot find function `PyEval_InitThreads` in module `ffi`
  --> /home/ploppz/.cargo/git/checkouts/rust-cpython-3cf10c007238aed2/ed21cf1/src/pythonrun.rs:65:18
   |
65 |             ffi::PyEval_InitThreads();
   |                  ^^^^^^^^^^^^^^^^^^ did you mean `PyEval_SaveThread`?

error[E0425]: cannot find function `PyEval_InitThreads` in module `ffi`
   --> /home/ploppz/.cargo/git/checkouts/rust-cpython-3cf10c007238aed2/ed21cf1/src/lib.rs:346:10
    |
346 |     ffi::PyEval_InitThreads();
    |          ^^^^^^^^^^^^^^^^^^ did you mean `PyEval_SaveThread`?
$ cat a.py
import sysconfig
config = sysconfig.get_config_vars()
print(config['WITH_THREAD'])

$ python a.py
Traceback (most recent call last):
  File "a.py", line 3, in <module>
    print(config['WITH_THREAD'])
KeyError: 'WITH_THREAD'

$ python2 a.py
1

$ python3.6 a.py
pyenv: python3.6: command not found

The `python3.6' command exists in these Python versions:
  3.6.6

I'm not sure what to do to solve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions