move-coop / parsons

A python library of connectors for the progressive community.
Other
254 stars 125 forks source link

[Bug] Unable to install parsons on Python 3.11, Linux distro #1048

Open anzelpwj opened 2 months ago

anzelpwj commented 2 months ago

Detailed Description

I have tried installing Parsons on my Linux laptop, but found that while I could install with Python 3.10, I would run into an issue on Python 3.11.

To Reproduce

# Using Anaconda as my virtualenv provider
conda create --name parsons_dev python=3.11
conda activate parsons_dev
pip install parsons

And after some installation, I get the following output

# A bunch of successful Collecting outputs
Collecting pyyaml<=5.99,>=3.0 (from civis==1.14.2->parsons)
  Using cached PyYAML-5.4.1.tar.gz (175 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
  ╰─> [54 lines of output]
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/home/anzelpwj/.pyenv/versions/miniconda3-latest/envs/parsons_dev2/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/anzelpwj/.pyenv/versions/miniconda3-latest/envs/parsons_dev2/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/anzelpwj/.pyenv/versions/miniconda3-latest/envs/parsons_dev2/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 104, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 550, in run
          self.add_defaults()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 201, in get_source_files
        File "/tmp/pip-build-env-xw9cu7ja/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [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.

Your Environment

Parsons: 3.1.0 Python: 3.11.9 OS: Pop!_OS 22.04 LTE (based on Ubuntu 22.04 LTE)

Additional Context

It appears that PyYAML <6.0.1 has issues installing on Python 3.11 (https://github.com/yaml/pyyaml/issues/736). It appears that we are installing an older version of the civis library (1.14.2, current is 1.61.1), so it might be good to see if we can upgrade the civis dependency and see if it fixes this issue.

@elyse-weiss appears to have encountered the same installation issue (discussion on Slack).

Priority

Medium, prevents use of Python 3.11 for me.

jdw25 commented 1 month ago

FYI: looks like civis just released 2.0.0 today.
Caveat: civis==2.0.0 supports python3.9-3.12

jdw25 commented 1 month ago

Also, this behavior you're observing seems weird b/c civis was bumped to 1.16.0 in 2022 via merged PR #764, which looks to have been rolled into the release of v1.0.0 and remains civis==1.16.0 to this day in v3.1.0. Also see Releases

anzelpwj commented 1 month ago

FYI: looks like civis just released 2.0.0 today. Caveat: civis==2.0.0 supports python3.9-3.12

Yeah, though it looks like civis 1.6.1 was meant to be python 3.7-3.9. So civis didn't really support the higher versions of Python that parsons did.

Agree that the fact that it was trying to intall the wrong version of civis is weird.