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

bug: cannot install complexipy #41

Closed
cameronbrill opened this issue Apr 22, 2024 · 6 comments
Closed

bug: cannot install complexipy #41

cameronbrill opened this issue Apr 22, 2024 · 6 comments
Assignees

Comments

@cameronbrill
Copy link

Hi, complexipy seems super cool/useful, but I'm struggling to get it installed. Running pip install complexipy gives me the following error:

➜  pip install complexipy
Collecting complexipy
  Using cached complexipy-0.3.2.tar.gz (22 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      error: failed to select a version for `env_logger`.
          ... required by package `complexipy v0.3.2 (/private/var/folders/wx/0d9m1sq12992h4fxxwf4fpf00000gn/T/pip-install-fa1nou7v/complexipy_5a3f8d99f5f74c59b7863bfc1472c7bf)`
      versions that meet the requirements `^0.11.1` (locked to 0.11.1) are: 0.11.1
      
      the package `complexipy` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
       It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
      
      
      failed to select a version for `env_logger` which could resolve this conflict
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/wx/0d9m1sq12992h4fxxwf4fpf00000gn/T/pip-modern-metadata-tap0eiff', '--interpreter', '/Users/cameronbrill/.pyenv/versions/3.8.5/bin/python3.8']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /private/var/folders/wx/0d9m1sq12992h4fxxwf4fpf00000gn/T/pip-modern-metadata-tap0eiff --interpreter /Users/cameronbrill/.pyenv/versions/3.8.5/bin/python3.8`
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I am running on an Apple M1 Max Macbook pro on MacOS 14.4.1. My python version is 3.8.5. Am I missing some setup step?

@rohaquinlop
Copy link
Owner

hey @cameronbrill thank you for using complexipy, I'm gonna check this error and try to fix it, thank you for all the details, I also use a M1 Pro so I think I could reproduce this error!

@rohaquinlop rohaquinlop self-assigned this Apr 22, 2024
rohaquinlop added a commit that referenced this issue Apr 23, 2024
- Fix build error on python 3.8.5
rohaquinlop added a commit that referenced this issue Apr 24, 2024
- Fix build error on python 3.8.5
rohaquinlop added a commit that referenced this issue Apr 24, 2024
- Fix build error on python 3.8.5
rohaquinlop added a commit that referenced this issue Apr 24, 2024
- Fix build error on python 3.8.5
@rohaquinlop
Copy link
Owner

@cameronbrill I was testing locally, and it seems that complexipy isn't working in python 3.8 due to the type hints that I'm using in the project, I couldn't install python 3.8.5 locally, but I installed complexipy in the version 3.8.19 and this is the version that fails during the execution of complexipy due to the type hints as I previously mentioned.

Already tested it in the version 3.9 and is working. Used the version 3.9.19.

image

I think that due to this issue, I will update the minimum python version to 3.9. Thank you so much for your contribution!
If you want to be a contributor and be listed at the contributor section, feel free to create a PR updating the minimum version to 3.9, pls relate that PR to this issue. ex: fix(build): #41 ...

@cameronbrill
Copy link
Author

cameronbrill commented Apr 25, 2024

Hi @rohaquinlop, thanks for the response! I just updated to python 3.9.18 but am still unable to install complexipy with the same error. fwiw this seems like a rust error, but I don't have any experience developing with rust so don't really know what to try next. Here's the important-looking part of the pip install complexipy error message:

      error: failed to select a version for `env_logger`.
          ... required by package `complexipy v0.3.2 (/private/var/folders/wx/0d9m1sq12992h4fxxwf4fpf00000gn/T/pip-install-i3h3smea/complexipy_353eb0ffe4ea4becb344a01a09558e31)`
      versions that meet the requirements `^0.11.1` (locked to 0.11.1) are: 0.11.1

      the package `complexipy` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
       It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


      failed to select a version for `env_logger` which could resolve this conflict
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/wx/0d9m1sq12992h4fxxwf4fpf00000gn/T/pip-modern-metadata-3oimthw3', '--interpreter', '/Users/cameronbrill/.pyenv/versions/3.9.18/bin/python3.9']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /private/var/folders/wx/0d9m1sq12992h4fxxwf4fpf00000gn/T/pip-modern-metadata-3oimthw3 --interpreter /Users/cameronbrill/.pyenv/versions/3.9.18/bin/python3.9`

@rohaquinlop
Copy link
Owner

@cameronbrill I'm still trying to figure out why it's giving you that error message 🤔

rohaquinlop added a commit that referenced this issue Apr 27, 2024
- Update CI to use maturin v1.5.1
- Remove unused dependencies, this will also fix the
build error caused by the removal of the `env_logger`
crate.
rohaquinlop added a commit that referenced this issue Apr 27, 2024
fix(rust): #41 update ci and remove unused dependencies
@rohaquinlop
Copy link
Owner

@cameronbrill found out that env_logger was an unused dependency, I removed the unused dependencies and published a new complexipy version, I think that you can try again to install complexipy.

@cameronbrill
Copy link
Author

just noticed this comment, I can't say if that fixed my issue as the project into which I was installing complexipy recently updated to python 3.10, but I'm able to install complexipy now! thanks for the help

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