Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python]can't find Rust compiler #217

Closed
yuanhaorannnnnn opened this issue Mar 30, 2022 · 3 comments
Closed

[Python]can't find Rust compiler #217

yuanhaorannnnnn opened this issue Mar 30, 2022 · 3 comments

Comments

@yuanhaorannnnnn
Copy link

I'm new for erdos, and I'm using README for installation and demo,
I've already done this
rustup default nightly # use nightly Rust toolchain
git clone https://github.com/erdos-project/erdos.git && cd erdos
and simple works fine,
python3 python/examples/simple_pipeline.py
But I'm stuck at
python3 python/setup.py develop
the error info is

running develop
running egg_info
writing python/erdos.egg-info/PKG-INFO
writing dependency_links to python/erdos.egg-info/dependency_links.txt
writing requirements to python/erdos.egg-info/requires.txt
writing top-level names to python/erdos.egg-info/top_level.txt
writing manifest file 'python/erdos.egg-info/SOURCES.txt'
running build_ext
running build_rust
error: can't find Rust compiler

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

To update pip, run:

pip install --upgrade pip

and then retry package installation.

If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

My host machine info:

Linux cluster01 4.15.0-112-generic #113~16.04.1-Ubuntu SMP Fri Jul 10 04:37:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I've double check the requirements packges, reinstall pip but still the same error
Any suggestion? many thanks advance.

@pschafhalter
Copy link
Member

Are you able to run cargo build --features=python? This will build the Rust bindings for python which is part of the step that's failing.

Alternatively, we're planning to release a new version of ERDOS in the next week with a new API and an improved build process. You can try it out on the redesign branch.

@yuanhaorannnnnn
Copy link
Author

Are you able to run cargo build --features=python? This will build the Rust bindings for python which is part of the step that's failing.

Alternatively, we're planning to release a new version of ERDOS in the next week with a new API and an improved build process. You can try it out on the redesign branch.

Thanks for your reply and I've try cargo build --features=python but I got the new error:

error: failed to download time v0.3.9

Caused by:
unable to get packages from source

Caused by:
failed to parse manifest at /home/strike/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.3.9/Cargo.toml

Caused by:
feature resolver is required

consider adding cargo-features = ["resolver"] to the manifest

According to the error, I did some dig in community and find some workaounrds, here are what I tried:

  1. rustup update
  2. eselect rust set 1
  3. add ``cargo-features = ["resolver"]` at /home/strike/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.3.9/Cargo.toml
  4. add ``cargo-features = ["resolver"]` at $PROJECT_ROOT/Cargo.toml

Unluckily, none of these works, so I'm waiting for your further suggestion and help.
Besides, I'll try the new branch you mentioned before, thanks again.

@yuanhaorannnnnn
Copy link
Author

I just re-implement all the env and package, now the build process works fine, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants