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

pendulum-3.0.0 Dependency #3905

Open
flexyboooy opened this issue Dec 26, 2023 · 13 comments
Open

pendulum-3.0.0 Dependency #3905

flexyboooy opened this issue Dec 26, 2023 · 13 comments

Comments

@flexyboooy
Copy link

While updating my flexget pyenv today I got this error:

  Downloading pendulum-3.0.0.tar.gz (84 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.5/84.5 kB 846.9 kB/s eta 0:00:00
  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
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

      Checking for Rust toolchain....
      [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.

Python 3.9.2
pip 23.3.2
flexget 3.10.7
Latest release: 3.11.0

Is this to be expected? Do we need to install Rust/Cargo now?

@gazpachoking
Copy link
Member

Hmm, there should be precompiled wheels available. What platform are you on?

@gazpachoking
Copy link
Member

you could also try to set the environment variable PENDULUM_EXTENSIONS=0 before building. Either way, report back your platform. If this is a common issue I'd like to make installation go more smoothly somehow.

@flexyboooy
Copy link
Author

I tried again while setting PENDULUM_EXTENSIONS=0 before updating but got the same error.

This is on a Raspbian GNU/Linux 11.8 (bullseye) on ARMv7 (armv7l).

@gazpachoking
Copy link
Member

gazpachoking commented Dec 28, 2023

I built pendulum 3.0 without the rust extensions. Try to grab this version, remove the .zip extension, then in your virtualenv run pip install path/to/downloaded/pendulum-3.0.0-py3-none-any.whl
pendulum-3.0.0-py3-none-any.whl.zip (EDIT: I put a broken build up at first, this is now edited to be the proper one.)

This isn't a permanent solution, but might work before we figure a better way.

@gazpachoking
Copy link
Member

Here's the pendulum ticket for this issue. sdispater/pendulum#784

@flexyboooy
Copy link
Author

I tried that and it let me upgrade to flexget v3.11.2 but unfortunately then flexget failed to start.

Dec 28 14:53:49 hostmachine systemd[1]: Started FlexGet Daemon.
Dec 28 14:53:52 hostmachine flexget[26349]: Traceback (most recent call last):
Dec 28 14:53:52 hostmachine flexget[26349]:   File "/hostpath/flexget/bin/flexget", line 5, in <module>
Dec 28 14:53:52 hostmachine flexget[26349]:     from flexget import main
Dec 28 14:53:52 hostmachine flexget[26349]:   File "/hostpath/flexget/lib/python3.9/site-packages/flexget/__init__.py", line 11, in <module>
Dec 28 14:53:52 hostmachine flexget[26349]:     from flexget.manager import Manager
Dec 28 14:53:52 hostmachine flexget[26349]:   File "/hostpath/flexget/lib/python3.9/site-packages/flexget/manager.py", line 37, in <module>
Dec 28 14:53:52 hostmachine flexget[26349]:     from flexget.config_schema import ConfigError
Dec 28 14:53:52 hostmachine flexget[26349]:   File "/hostpath/flexget/lib/python3.9/site-packages/flexget/config_schema.py", line 15, in <module>
Dec 28 14:53:52 hostmachine flexget[26349]:     from flexget.utils import qualities, template
Dec 28 14:53:52 hostmachine flexget[26349]:   File "/hostpath/flexget/lib/python3.9/site-packages/flexget/utils/template.py", line 12, in <module>
Dec 28 14:53:52 hostmachine flexget[26349]:     import pendulum
Dec 28 14:53:52 hostmachine flexget[26349]: ModuleNotFoundError: No module named 'pendulum'
Dec 28 14:53:52 hostmachine systemd[1]: flexget.service: Main process exited, code=exited, status=1/FAILURE
Dec 28 14:53:52 hostmachine systemd[1]: flexget.service: Failed with result 'exit-code'.

I am going back to a fresh install of flexget==3.10.7 for now and wait it out.

Thank you!

@gazpachoking
Copy link
Member

Oops, sorry about that, I made a broken one at first and turns out I uploaded that accidentally. You could run pip uninstall pendulum in your virtualenv, then try again with the same procedure with this one.
pendulum-3.0.0-py3-none-any.whl.zip

@gazpachoking
Copy link
Member

Can everyone having this issue please post what platform you are on here? (what processor and OS) Is everybody with this issue on a 32 bit OS?

@SpaceRat42
Copy link

SpaceRat42 commented Dec 29, 2023

I'm experiencing the same or similar problem using Raspberry Pi OS () / 64 bit (Linux raspberryPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 / Raspbian GNU/Linux 11 (bullseye)).

After setting PENDULUM_EXTENSIONS=0, "pip install --upgrade flexget" results in:

Collecting pendulum==3.0.0 (from flexget)
  Using cached pendulum-3.0.0.tar.gz (84 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
  ╰─> [10 lines of output]
      error: failed to parse manifest at `/tmp/pip-install-8nis1tmv/pendulum_ccb8c1e74cd34af4be45e580ac0b8b8a/rust/Cargo.toml`
      
      Caused by:
        invalid type: unit variant, expected string only for key `profile.release.strip`
      💥 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', '/tmp/pip-modern-metadata-7zb2146g', '--interpreter', '/usr/bin/python3']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-7zb2146g --interpreter /usr/bin/python3`
      [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 also downgrade to 3.10.7 for the moment.

Big thanks for your great work and support!

@flexyboooy
Copy link
Author

Oops, sorry about that, I made a broken one at first and turns out I uploaded that accidentally. You could run pip uninstall pendulum in your virtualenv, then try again with the same procedure with this one. pendulum-3.0.0-py3-none-any.whl.zip

Ah, this one did it, I was able to upgrade and start Flexget: 3.11.2.

Again, thank you!

@SpaceRat42
Copy link

Just wantet to add, that my problem might be related to the mssion virtal environment. On a second Raspberry Pi (Raspberry Pi Bookworm / 64 bit), flexgte is installed in an virtual environment I was able to update to 3.11.3 without problems.

@Roburetto
Copy link

Roburetto commented Jan 21, 2024

Can everyone having this issue please post what platform you are on here? (what processor and OS) Is everybody with this issue on a 32 bit OS?

Building of Pendulum 3.0.0 failing on venv:
Debian 8.11 armv7l (32bits)* - Kernel 3.2.68
Python 3.11.5
rustc 1.73.0
cargo 1.73.0

Workaround from #3905 (comment) worked. Thanks for that.

(*) Also seeing the PYO3_ENVIRONMENT_SIGNATURE="cpython-3.8-64bit" described in sdispater/pendulum#784 (comment)

@abugher
Copy link

abugher commented Feb 5, 2024

Processor: armv7l (ARMv7 Processor rev 3)
OS: Debian 12, bookworm (Armbian)
cargo: 0.66.0 (OS package)
rustc: 1.63.0 (OS package)
python: 3.11.2 (OS package)

The problem I observed matched the general description: Installing or updating flexget depends on pendulum, causing an attempt to build, which fails. The pre-built wheels file worked around the problem for me as well. (Thank you.)

The specific error looks different. I don't see mention of variable type definitions or bit widths, but I do see noise about unstable features.

$ virtualenv flexget
$ flexget/bin/pip3 install flexget

...

  Building wheel for pendulum (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pendulum (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [47 lines of output]
      Running `maturin pep517 build-wheel -i /home/ansible/flexget/bin/python --compatibility off`
      🍹 Building a mixed python/rust project
      🔗 Found pyo3 bindings
      🐍 Found CPython 3.11 at /home/ansible/flexget/bin/python
         Compiling target-lexicon v0.12.6
         Compiling python3-dll-a v0.2.9
         Compiling libc v0.2.139
         Compiling autocfg v1.1.0
         Compiling proc-macro2 v1.0.51
         Compiling once_cell v1.17.1
         Compiling unicode-ident v1.0.6
         Compiling quote v1.0.23
         Compiling syn v1.0.109
         Compiling parking_lot_core v0.9.7
         Compiling cc v1.0.79
         Compiling smallvec v1.10.0
         Compiling lock_api v0.4.9
         Compiling memoffset v0.9.0
         Compiling scopeguard v1.1.0
         Compiling cfg-if v1.0.0
         Compiling indoc v1.0.9
         Compiling unindent v0.1.11
         Compiling pyo3-build-config v0.19.1
         Compiling libmimalloc-sys v0.1.35
         Compiling parking_lot v0.12.1
         Compiling pyo3-ffi v0.19.1
         Compiling pyo3 v0.19.1
         Compiling mimalloc v0.1.39
         Compiling pyo3-macros-backend v0.19.1
         Compiling pyo3-macros v0.19.1
         Compiling _pendulum v3.0.0 (/tmp/pip-install-qyk6hnsh/pendulum_7973b75bd3c14f22bf64cdd2bcfe4c67/rust)
      error[E0658]: `let...else` statements are unstable
         --> src/parsing.rs:817:9
          |
      817 | /         let Some(mut value) = self.current.to_digit(10) else {
      818 | |             return Err(self.parse_error("Invalid number in duration".to_string()));
      819 | |         };
          | |__________^
          |
          = note: see issue #87335 <https://github.com/rust-lang/rust/issues/87335> for more information
      
      For more information about this error, try `rustc --explain E0658`.
      error: could not compile `_pendulum` due to previous error
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `PYO3_ENVIRONMENT_SIGNATURE="cpython-3.11-64bit" PYO3_PYTHON="/home/ansible/flexget/bin/python" PYTHON_SYS_EXECUTABLE="/home/ansible/flexget/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-qyk6hnsh/pendulum_7973b75bd3c14f22bf64cdd2bcfe4c67/rust/Cargo.toml" "--release" "--lib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/ansible/flexget/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pendulum

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

5 participants