JonasSchult/Mask3D

Dependency on Pyyaml==5.4.1

Satantago opened this issue · 6 comments

Due to release of Cython 0.3, conda env create -f environment.yml yields error:

Collecting pyyaml==5.4.1
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

Pip subprocess error:
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      /tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      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/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 314, in run
          self.find_sources()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
          mm.run()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 551, in run
          self.add_defaults()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-un_nglfx/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, 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-un_nglfx/overlay/lib/python3.10/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.

failed

CondaEnvException: Pip failed

This is related to the recent Pyyaml issue: yaml/pyyaml#724

Using PyYAML==6.0 gives:

The conflict is caused by:
    The user requested pyyaml==6.0
    albumentations 1.2.1 depends on PyYAML
    fvcore 0.1.5.post20220512 depends on pyyaml>=5.1
    omegaconf 2.0.6 depends on PyYAML>=5.1.*
    open3d 0.17.0 depends on pyyaml>=5.4.1
    volumentations 0.1.8 depends on pyyaml<6.0.0 and >=5.3.1

and using PyYAML==5.3.1 gives:

The conflict is caused by:
    The user requested pyyaml==5.3.1
    albumentations 1.2.1 depends on PyYAML
    fvcore 0.1.5.post20220512 depends on pyyaml>=5.1
    omegaconf 2.0.6 depends on PyYAML>=5.1.*
    open3d 0.17.0 depends on pyyaml>=5.4.1

Divadi commented

I commented out pycocotools and pyyaml in the environment yaml and manually ran:

# https://github.com/yaml/pyyaml/issues/724
with-proxy pip install "cython<3.0.0"
with-proxy pip install --no-build-isolation pycocotools==2.0.4
with-proxy pip install --no-build-isolation "pyyaml<6.0"

Thank you for your answer!
I don't know much about proxy and its purpose in this context, so i ran the commands without proxy

 1956  pip install "cython<3.0.0"
 1957  pip install --no-build-isolation pycocotools==2.0.4
 1958  pip install --no-build-isolation "pyyaml<6.0"

then i ran the conda env create -f environment.yml command but it still gave me an error:

........
........
........
Collecting tensorboard-data-server==0.7.0
  Using cached tensorboard_data_server-0.7.0-py3-none-manylinux2014_x86_64.whl (6.6 MB)
Collecting tensorboard-plugin-wit==1.8.1
  Using cached tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
Collecting termcolor==2.2.0
  Using cached termcolor-2.2.0-py3-none-any.whl (6.6 kB)
Collecting threadpoolctl==3.1.0
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting tifffile==2023.4.12
  Using cached tifffile-2023.4.12-py3-none-any.whl (219 kB)
Collecting toml==0.10.2
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting tornado==6.3
  Using cached tornado-6.3-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (426 kB)
Collecting traitlets==5.9.0
  Using cached traitlets-5.9.0-py3-none-any.whl (117 kB)
Collecting trimesh==3.14.0
  Using cached trimesh-3.14.0-py3-none-any.whl (660 kB)
Requirement already satisfied: typing-extensions==4.5.0 in /home/errazkim/.local/lib/python3.10/site-packages (from -r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 135)) (4.5.0)
Collecting tzdata==2023.3
  Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB)
Collecting uvicorn==0.21.1
  Using cached uvicorn-0.21.1-py3-none-any.whl (57 kB)
Collecting volumentations==0.1.8
  Using cached volumentations-0.1.8-py3-none-any.whl (15 kB)
Collecting wandb==0.15.0
  Using cached wandb-0.15.0-py3-none-any.whl (2.0 MB)
Collecting wcwidth==0.2.6
  Using cached wcwidth-0.2.6-py2.py3-none-any.whl (29 kB)
Collecting werkzeug==2.2.3
  Using cached Werkzeug-2.2.3-py3-none-any.whl (233 kB)
Collecting widgetsnbextension==4.0.7
  Using cached widgetsnbextension-4.0.7-py3-none-any.whl (2.1 MB)
Collecting yacs==0.1.8
  Using cached yacs-0.1.8-py3-none-any.whl (14 kB)
Collecting yarl==1.8.2
  Using cached yarl-1.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (264 kB)
Collecting zipp==3.15.0
  Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from aiohttp==3.8.4->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 3)) (2.0.4)
Collecting PyYAML
  Using cached PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (705 kB)
Requirement already satisfied: idna>=2.8 in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from anyio==3.6.2->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 7)) (3.4)
Requirement already satisfied: six in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from asttokens==2.2.1->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 9)) (1.16.0)
Collecting pyflakes<3.1.0,>=3.0.0
  Using cached pyflakes-3.0.1-py2.py3-none-any.whl (62 kB)
Collecting mccabe<0.8.0,>=0.7.0
  Using cached mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting pycodestyle<2.11.0,>=2.10.0
  Using cached pycodestyle-2.10.0-py2.py3-none-any.whl (41 kB)
Requirement already satisfied: tqdm in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from fvcore==0.1.5.post20220512->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 37)) (4.65.0)
Requirement already satisfied: packaging in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from ipykernel==6.22.0->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 48)) (23.0)
Requirement already satisfied: requests>=2.0.0 in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from requests-oauthlib==1.3.1->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 112)) (2.28.1)
Requirement already satisfied: certifi in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from sentry-sdk==1.20.0->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 117)) (2022.12.7)
Requirement already satisfied: urllib3>=1.26.11 in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from sentry-sdk==1.20.0->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 117)) (1.26.15)
Requirement already satisfied: wheel>=0.26 in /home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages (from tensorboard==2.12.2->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 125)) (0.37.1)
Requirement already satisfied: setuptools>=41.0.0 in /home/errazkim/.local/lib/python3.10/site-packages (from tensorboard==2.12.2->-r /home/errazkim/code/Mask3D/condaenv.y4oc160j.requirements.txt (line 125)) (68.0.0)
Collecting PyYAML
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

Pip subprocess error:
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      /tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      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/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/errazkim/miniconda3/envs/mask3d_cuda113/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 314, in run
          self.find_sources()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
          mm.run()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 551, in run
          self.add_defaults()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-weeoc68d/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 336, 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-weeoc68d/overlay/lib/python3.10/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.

failed

CondaEnvException: Pip failed

Divadi commented

with-proxy was just something I had to do on my setup, you can ignore it
Maybe you can try:

  • uninstalling pyyaml before going through above
  • Did you make sure to comment out pyyaml and pycocotools in the environment yaml?

@Divadi even I am facing the issue and commenting those two packages didn't fix the issue.
I fixed the issue by installing pyyaml first and manually installed other packages
pip install "cython<3.0.0" && pip install --no-build-isolation pyyaml==5.4.1 reference here