You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[package]
name = "xxx"
version = "0.1.0"
authors = ["dc-koromo <koromo.software@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
pyo3 = "0.11.1"
xxx@xxx-B250M-DS3H:~/xxx$ cargo run --verbose
Fresh unicode-xid v0.2.1
Fresh proc-macro-hack v0.5.18
Fresh smallvec v1.4.1
Fresh unindent v0.1.6
Fresh instant v0.1.6
Fresh cfg-if v0.1.10
Fresh scopeguard v1.1.0
Fresh paste-impl v0.1.18
Fresh lock_api v0.4.1
Fresh proc-macro2 v1.0.19
Fresh libc v0.2.74
Fresh paste v0.1.18
Fresh quote v1.0.7
Fresh parking_lot_core v0.8.0
Fresh syn v1.0.36
Fresh parking_lot v0.11.0
Fresh indoc-impl v0.3.6
Fresh inventory-impl v0.1.7
Fresh pyo3-derive-backend v0.11.1
Fresh ctor v0.1.15
Fresh ghost v0.1.2
Fresh indoc v0.3.6
Fresh pyo3cls v0.11.1
Fresh inventory v0.1.7
Fresh pyo3 v0.11.1
Compiling xxx v0.1.0 (/home/xxx)
Running `rustc --crate-name xxx --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=d32b4e64e7579a4a -C extra-filename=-d32b4e64e7579a4a --out-dir /home/xxx/target/debug/deps -C incremental=/home/xxx/target/debug/incremental -L dependency=/home/xxx/target/debug/deps --extern pyo3=/home/xxx/target/debug/deps/libpyo3-8af27c426a1f6725.rlib -L native=/usr/lib`
error[E0599]: no function or associated item named `with_gil` found for struct `pyo3::python::Python<'_>` in the current scope
--> src/main.rs:5:13
|
5 | Python::with_gil(|py| {
| ^^^^^^^^ function or associated item not found in `pyo3::python::Python<'_>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.
error: could not compile `xxx`.
Caused by:
process didn't exit successfully: `rustc --crate-name xxx --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=d32b4e64e7579a4a -C extra-filename=-d32b4e64e7579a4a --out-dir /home/xxx/target/debug/deps -C incremental=/home/xxx/target/debug/incremental -L dependency=/home/xxx/target/debug/deps --extern pyo3=/home/xxx/target/debug/deps/libpyo3-8af27c426a1f6725.rlib -L native=/usr/lib` (exit code: 1)
I tried running the example code, but it didn't build.
The text was updated successfully, but these errors were encountered:
Python::with_gil is a new API that will be the preferred way to use PyO3 once it releases in PyO3 0.12. The README is on the master branch where this API already exists, but perhaps I should have waited to update it until 0.12 is released.
As @rmarru notes, if you stick to the examples shipped with 0.11.1, everything works.
For now, I'm going to close unless others think I should backport README.md temporarily.
馃悰 Bug Reports
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.
馃實 Environment
rustc --version
): rustc 1.45.0 (5c1f21c3b 2020-07-13)version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
:馃挜 Reproducing
src/main.rs
Cargo.toml
I tried running the example code, but it didn't build.
The text was updated successfully, but these errors were encountered: