citusdata / tools

Tools and config used in Citus Data projects
14 stars 15 forks source link

[citus_dev] failure when installing dependencies via pipenv #375

Open hanefi opened 1 month ago

hanefi commented 1 month ago

I am setting up a new machine and I encountered an issue when trying to install citus_dev dependencies.

I installed latest python 3.10 patch using pyenv and set it as global default. Running pipenv install fails when building wheels for docopt.

For the time being, I stopped using pipenv and started using the globally set python version instead.

❯ pyenv versions
  system
* 3.10.15 (set by /home/hanefi/.pyenv/version)
  3.12.7
❯ pipenv install
Installing dependencies from Pipfile.lock (e20e02)...
[pipenv.exceptions.InstallError]: Collecting docopt==0.6.2 (from -r /tmp/pipenv-an5bgt9c-requirements/pipenv-4d3xjc6_-hashed-reqs.txt (line 1))
[pipenv.exceptions.InstallError]:   Using cached docopt-0.6.2.tar.gz (25 kB)
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): started
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): finished with status 'done'
[pipenv.exceptions.InstallError]: Building wheels for collected packages: docopt
[pipenv.exceptions.InstallError]:   Building wheel for docopt (setup.py): started
[pipenv.exceptions.InstallError]:   Building wheel for docopt (setup.py): finished with status 'error'
[pipenv.exceptions.InstallError]:   Running setup.py clean for docopt
[pipenv.exceptions.InstallError]: Failed to build docopt
[pipenv.exceptions.InstallError]: error: subprocess-exited-with-error
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   × python setup.py bdist_wheel did not run successfully.
[pipenv.exceptions.InstallError]:   │ exit code: 1
[pipenv.exceptions.InstallError]:   ╰─> [69 lines of output]
[pipenv.exceptions.InstallError]:       running bdist_wheel
[pipenv.exceptions.InstallError]:       The [wheel] section is deprecated. Use [bdist_wheel] instead.
[pipenv.exceptions.InstallError]:       running build
[pipenv.exceptions.InstallError]:       running build_py
[pipenv.exceptions.InstallError]:       creating build
[pipenv.exceptions.InstallError]:       creating build/lib
[pipenv.exceptions.InstallError]:       copying docopt.py -> build/lib
[pipenv.exceptions.InstallError]:       warning: build_py: byte-compiling is disabled, skipping.
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:       /home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
[pipenv.exceptions.InstallError]:       !!
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:               ********************************************************************************
[pipenv.exceptions.InstallError]:               Please avoid running ``setup.py`` directly.
[pipenv.exceptions.InstallError]:               Instead, use pypa/build, pypa/installer or other
[pipenv.exceptions.InstallError]:               standards-based tools.
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:               See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
[pipenv.exceptions.InstallError]:               ********************************************************************************
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:       !!
[pipenv.exceptions.InstallError]:         self.initialize_options()
[pipenv.exceptions.InstallError]:       installing to build/bdist.linux-x86_64/wheel
[pipenv.exceptions.InstallError]:       running install
[pipenv.exceptions.InstallError]:       running install_lib
[pipenv.exceptions.InstallError]:       Traceback (most recent call last):
[pipenv.exceptions.InstallError]:         File "<string>", line 2, in <module>
[pipenv.exceptions.InstallError]:         File "<pip-setuptools-caller>", line 34, in <module>
[pipenv.exceptions.InstallError]:         File "/tmp/pip-install-bcposprg/docopt_8804a547525e4a0c8fab632d167e7ad6/setup.py", line 6, in <module>
[pipenv.exceptions.InstallError]:           setup(
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
[pipenv.exceptions.InstallError]:           return distutils.core.setup(**attrs)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
[pipenv.exceptions.InstallError]:           return run_commands(dist)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
[pipenv.exceptions.InstallError]:           dist.run_commands()
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
[pipenv.exceptions.InstallError]:           self.run_command(cmd)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
[pipenv.exceptions.InstallError]:           super().run_command(command)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
[pipenv.exceptions.InstallError]:           cmd_obj.run()
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 403, in run
[pipenv.exceptions.InstallError]:           self.run_command("install")
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
[pipenv.exceptions.InstallError]:           self.distribution.run_command(command)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
[pipenv.exceptions.InstallError]:           super().run_command(command)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
[pipenv.exceptions.InstallError]:           cmd_obj.run()
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/command/install.py", line 78, in run
[pipenv.exceptions.InstallError]:           return orig.install.run(self)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 708, in run
[pipenv.exceptions.InstallError]:           self.run_command(cmd_name)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
[pipenv.exceptions.InstallError]:           self.distribution.run_command(command)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/dist.py", line 1233, in run_command
[pipenv.exceptions.InstallError]:           super().run_command(command)
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
[pipenv.exceptions.InstallError]:           cmd_obj.ensure_finalized()
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
[pipenv.exceptions.InstallError]:           self.finalize_options()
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
[pipenv.exceptions.InstallError]:           self.set_undefined_options('install',('install_layout','install_layout'))
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 296, in set_undefined_options
[pipenv.exceptions.InstallError]:           setattr(self, dst_option, getattr(src_cmd_obj, src_option))
[pipenv.exceptions.InstallError]:         File "/home/hanefi/.local/share/virtualenvs/citus_dev-5qqDtrb0/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
[pipenv.exceptions.InstallError]:           raise AttributeError(attr)
[pipenv.exceptions.InstallError]:       AttributeError: install_layout. Did you mean: 'install_platlib'?
[pipenv.exceptions.InstallError]:       [end of output]
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:   note: This error originates from a subprocess, and is likely not a problem with pip.
[pipenv.exceptions.InstallError]:   ERROR: Failed building wheel for docopt
[pipenv.exceptions.InstallError]: ERROR: Could not build wheels for docopt, which is required to install pyproject.toml-based projects
ERROR: Couldn't install package: {}
 Package installation failed...