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

Unable to download wordcloud using python3.12 #733

Closed
yeamu opened this issue Aug 29, 2023 · 7 comments · Fixed by #738
Closed

Unable to download wordcloud using python3.12 #733

yeamu opened this issue Aug 29, 2023 · 7 comments · Fixed by #738

Comments

@yeamu
Copy link

yeamu commented Aug 29, 2023

I don't have wordcloud in my environment, the error when I downloaded it for the first time

$ pip install wordcloud
Collecting wordcloud
  Using cached wordcloud-1.9.2.tar.gz (222 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "C:\Users\My\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\My\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\My\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\My\AppData\Local\Temp\pip-build-env-r319sge_\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\My\AppData\Local\Temp\pip-build-env-r319sge_\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "C:\Users\My\AppData\Local\Temp\pip-build-env-r319sge_\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\My\AppData\Local\Temp\pip-build-env-r319sge_\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 13, in <module>
        File "C:\Users\My\AppData\Local\Temp\pip-install-z2znv06l\wordcloud_7a7633e00c2749ad8aa5074a2da9b730\versioneer.py", line 1480, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "C:\Users\My\AppData\Local\Temp\pip-install-z2znv06l\wordcloud_7a7633e00c2749ad8aa5074a2da9b730\versioneer.py", line 1412, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\My\AppData\Local\Temp\pip-install-z2znv06l\wordcloud_7a7633e00c2749ad8aa5074a2da9b730\versioneer.py", line 342, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

This error appears to be due to code in the versioneer.py file in the wordcloud package using the outdated SafeConfigParser which has been renamed to RawConfigParser in Python 3.12

I hope someone can help me, thanks

@T1t4m1un
Copy link
Contributor

If there isn't a strict requirement for Python 3.12, rolling back to a lower version of Python, such as 3.11, could help.

T1t4m1un added a commit to T1t4m1un/word_cloud that referenced this issue Oct 12, 2023
…thon 3.12

1. Replaced deprecated names based on Python 3.12's changelog (configparser.SafeConfigParser -> configparser.ConfigParser, configparser.readfp() -> configparser.read_file()).
2. Added Cython as a dependency.
3. Changed the generation of the Cython C code for release to occur and compile during setup.py execution.
@yeamu
Copy link
Author

yeamu commented Oct 13, 2023

If there isn't a strict requirement for Python 3.12, rolling back to a lower version of Python, such as 3.11, could help.

Thanks for the reply, this is exactly how I solved it

@mkirienye
Copy link

mkirienye commented Nov 3, 2023

After a few days of frustrations, I installed worldcloud on jupyter notebook (Python3.12) by doing the following;

  1. pip install --upgrade pillow
  2. pip install --upgrade wordcloud
    Everything worked fine.

@i-salameh95
Copy link

Today I have the same issue on macOS version 13.6.1 with python 3.12
I tried downgrade the python version to 3.9 and tried again.. with no success
any help on how to use this wonderful package on macOS ?

@MagicFernandez
Copy link

I have the same problem, I'm using python 3.12 in a Windows 11 64bits. I'm trying to install wordcloud using jupyter notebook and I can't solve it. I have tried to install the wheel file, also to use different sentences on cmd and I'm so frustrated </3.
Please help

@i-salameh95
Copy link

I have the same problem, I'm using python 3.12 in a Windows 11 64bits. I'm trying to install wordcloud using jupyter notebook and I can't solve it. I have tried to install the wheel file, also to use different sentences on cmd and I'm so frustrated </3. Please help

Try downgrade python to python 3.9
I have tried that on macOS and its working like a charm

@MagicFernandez
Copy link

The best solution was to downgrade Python to Python 3.11.
everything worked.

thomasjpfan added a commit that referenced this issue Dec 5, 2023
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

Successfully merging a pull request may close this issue.

5 participants