robocorp / rpaframework

Collection of open-source libraries and tools for Robotic Process Automation (RPA), designed to be used with both Robot Framework and Python
https://www.rpaframework.org/
Apache License 2.0
1.14k stars 219 forks source link

Cannot install rpaframework - python 3.12 #1155

Open KamilSoko opened 6 months ago

KamilSoko commented 6 months ago

Hi,

I cannot install rpaframework. Distutils module is deprecated in Python 3.12. I have installed setuptools module to resolve that problem but without any success.

Thanks for your assistance.

Wheel build error below:

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
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "C:\Users\_____\AppData\Local\Temp\pip-install-l00zgag0\pendulum_a6da085d36564e299ed50ecd53335090\build.py", line 5, in <module>
          from distutils.command.build_ext import build_ext
      ModuleNotFoundError: No module named 'distutils'
      Traceback (most recent call last):
        File "C:\Users\_____\Desktop\test2\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\_____\Desktop\test2\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\_____\Desktop\test2\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\_____\AppData\Local\Temp\pip-build-env-6067vdox\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 58, in build_wheel
          return WheelBuilder.make_in(
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\_____\AppData\Local\Temp\pip-build-env-6067vdox\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 88, in make_in
          wb.build(target_dir=directory)
        File "C:\Users\_____\AppData\Local\Temp\pip-build-env-6067vdox\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 123, in build
          self._build(zip_file)
        File "C:\Users\_____\AppData\Local\Temp\pip-build-env-6067vdox\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 172, in _build
          self._run_build_script(self._package.build_script)
        File "C:\Users\_____\AppData\Local\Temp\pip-build-env-6067vdox\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 262, in _run_build_script
          subprocess.check_call([self.executable.as_posix(), build_script])
        File "C:\Users\_____\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['C:/Users/_____/Desktop/test2/Scripts/python.exe', 'build.py']' 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
Failed to build pendulum
ERROR: Could not build wheels for pendulum, which is required to install pyproject.toml-based projects
mikahanninen commented 6 months ago

Our recommended Python version is 3.10.12 as indicated in our templates, as an example Python template.

Newer Python versions run a risk of lack of support in packages as indicated by the https://pyreadiness.org/3.10 (overall support level 77.2%) compared to https://pyreadiness.org/3.12 (overall support level 47.5%).

Just tried with Python=3.11.7 and rpaframework was successfully installed for that.

DanBrown47 commented 6 months ago

Can we move to bump the dependencies and add support for 3.12 ?

axiom41 commented 6 months ago

Can we move to bump the dependencies and add support for 3.12 ?

Exactly: "pendulum" package, that seems to generate the error, has been updated to v3.0.0 since mid-december (compatibility with python 3.12 added), but rpaframework still requires (and reinstalls) v2.1.2

mikahanninen commented 6 months ago

I understand your concerns, but if overall dependency support for most used Python packages in 3.12 is less than 50% then it can't be supported by us.

I will look into pendulum upgrade though if that can be done without further issues.

shinenazeer commented 6 months ago

That would be great.

IlfirinPL commented 4 months ago

I notice that pendulum-3.0.0 install and works properly with python 3.12, maybe it`s possible to bump the dependency

vncs1880 commented 4 months ago

Our recommended Python version is 3.10.12 as indicated in our templates, as an example Python template.

Newer Python versions run a risk of lack of support in packages as indicated by the https://pyreadiness.org/3.10 (overall support level 77.2%) compared to https://pyreadiness.org/3.12 (overall support level 47.5%).

Just tried with Python=3.11.7 and rpaframework was successfully installed for that.

from https://pyreadiness.org/3.12/ as seen today:

190 green packages (52.8%) support Python 3.12; 170 white packages (47.2%) don't explicitly support Python 3.12 yet.

I wonder if it's ok now 🤷‍♂️

cabralbill commented 3 months ago

you will generate a new version and remove the dependency?

NorseGaud commented 1 month ago

Bump

DanBrown47 commented 1 month ago

@mikahanninen Can you look into the same ?

cc : @shinenazeer

ahsalama commented 2 weeks ago

I know this is not a real reliable solution , but I tried it and it worked, try the solution in not-able-to-install-rpa-library-in-robot-framework

AlexanderRavenheart commented 1 week ago

Our recommended Python version is 3.10.12 as indicated in our templates, as an example Python template.

Newer Python versions run a risk of lack of support in packages as indicated by the https://pyreadiness.org/3.10 (overall support level 77.2%) compared to https://pyreadiness.org/3.12 (overall support level 47.5%).

Just tried with Python=3.11.7 and rpaframework was successfully installed for that.

That is a poor metric to use for evaluating the supported Python versions since there are plenty of projects like blinker, flake8, beautifulsoup4 (just to name a few), that don't bother adding the version specific classifiers.

blinker: image

flake8: image

beautifulsoup4: image

image

Not having the version specific classifier does not automatically imply a specific Python version is not supported by that project.