winstonyym / urbanity

A network-based python package to understand and model urban complexity
https://urbanity.readthedocs.io/en/latest/
MIT License
138 stars 11 forks source link

Unable to install environment.yml/urbanity package because of pip dependency #4

Closed DaveO1989 closed 12 months ago

DaveO1989 commented 1 year ago

Hello i tried to install the environment.yml as described, but I receive following error regarding the pip subprocess and therefore are unable to install the urbanity package. Does somebody has the same/similar issue?

As the error message advised I installed the Microsoft Visual C++ 14.0 compiler. But the issue with the pyrobuf package I couldn't solve. I tried to create the environment with the --use-pep517 - flag, but another error occured.

As well i tried not to create the environment.yml. instead set up a new conda environment and installed every single package with pip install > same issue with the urbanity package.

Do you have an easy solution for the problem or am I missing something here? Thanks in advance.

C:\ProgramData\Anaconda3\envs>conda env update -f environment.yml Collecting package metadata (repodata.json): done Solving environment: done Installing pip dependencies: \ Ran pip subprocess with arguments: ['C:\ProgramData\Anaconda3\envs\urbanity\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt'] Pip subprocess output: Collecting urbanity==0.3.13 (from -r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Obtaining dependency information for urbanity==0.3.13 from https://files.pythonhosted.org/packages/eb/69/174e81f6731264fb3cd668979230926601bd41553136a2d521d466cd1ac8/urbanity-0.3.13-py3-none-any.whl.metadata Using cached urbanity-0.3.13-py3-none-any.whl.metadata (875 bytes) Collecting charset-normalizer==2.1.1 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Collecting geopandas==0.12.0 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached geopandas-0.12.0-py3-none-any.whl (1.1 MB) Collecting ipykernel==6.16.2 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached ipykernel-6.16.2-py3-none-any.whl (138 kB) Collecting ipyleaflet==0.17.2 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached ipyleaflet-0.17.2-py3-none-any.whl (3.7 MB) Requirement already satisfied: ipywidgets==8.0.2 in c:\programdata\anaconda3\envs\urbanity\lib\site-packages (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) (8.0.2) Collecting mercantile<2.0.0,>=1.2.1 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached mercantile-1.2.1-py3-none-any.whl (14 kB) Collecting networkit==10.0 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached networkit-10.0-cp39-cp39-win_amd64.whl (21.0 MB) Collecting networkx==2.8.6 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached networkx-2.8.6-py3-none-any.whl (2.0 MB) Collecting numpy==1.23.3 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached numpy-1.23.3-cp39-cp39-win_amd64.whl (14.7 MB) Collecting protobuf==3.20.0 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached protobuf-3.20.0-cp39-cp39-win_amd64.whl (904 kB) Collecting pyrobuf==0.9.3 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached pyrobuf-0.9.3.tar.gz (258 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting pyrosm==0.6.1 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached pyrosm-0.6.1.tar.gz (2.1 MB) Installing build dependencies: started Installing build dependencies: finished with status 'error'

Pip subprocess error: error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [298 lines of output] Collecting setuptools Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/4f/ab/0bcfebdfc3bfa8554b2b2c97a555569c4c1ebc74ea288741ea8326c51906/setuptools-68.1.2-py3-none-any.whl.metadata Using cached setuptools-68.1.2-py3-none-any.whl.metadata (6.2 kB) Collecting wheel Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB) Collecting Cython Obtaining dependency information for Cython from https://files.pythonhosted.org/packages/f9/20/400f5caa238051c54534f8ae76f9b2fcf1cd4171e7eba8d50f0066aff2ba/Cython-3.0.2-cp39-cp39-win_amd64.whl.metadata Using cached Cython-3.0.2-cp39-cp39-win_amd64.whl.metadata (3.2 kB) Collecting cykhash Using cached cykhash-2.0.1.tar.gz (44 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 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting pyrobuf Using cached pyrobuf-0.9.3.tar.gz (258 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting jinja2>=2.8 (from pyrobuf) Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Collecting MarkupSafe>=2.0 (from jinja2>=2.8->pyrobuf) Obtaining dependency information for MarkupSafe>=2.0 from https://files.pythonhosted.org/packages/a2/b2/624042cb58cc6b3529a6c3a7b7d230766e3ecb768cba118ba7befd18ed6f/MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl.metadata Using cached MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl.metadata (3.1 kB) Using cached setuptools-68.1.2-py3-none-any.whl (805 kB) Using cached wheel-0.41.2-py3-none-any.whl (64 kB) Using cached Cython-3.0.2-cp39-cp39-win_amd64.whl (2.8 MB) Using cached MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl (17 kB) Building wheels for collected packages: cykhash, pyrobuf Building wheel for cykhash (pyproject.toml): started Building wheel for cykhash (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

    × Building wheel for cykhash (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [49 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build\lib.win-amd64-cpython-39
        creating build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\compat.py -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\__init__.py -> build\lib.win-amd64-cpython-39\cykhash
        running egg_info
        writing src\cykhash.egg-info\PKG-INFO
        writing dependency_links to src\cykhash.egg-info\dependency_links.txt
        writing top-level names to src\cykhash.egg-info\top_level.txt
        reading manifest file 'src\cykhash.egg-info\SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        adding license file 'LICENSE'
        writing manifest file 'src\cykhash.egg-info\SOURCES.txt'
        copying src\cykhash\common.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\floatdef.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\hash_functions.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khash.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashmaps.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashmaps.pyx -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashsets.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashsets.pyx -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\memory.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\murmurhash.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\unique.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\unique.pyx -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\utils.pyx -> build\lib.win-amd64-cpython-39\cykhash
        creating build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_header.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_impl.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_init.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\maps
        creating build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_header.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_impl.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_init.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\sets
        creating build\lib.win-amd64-cpython-39\cykhash\unique
        copying src\cykhash\unique\unique_impl.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\unique
        copying src\cykhash\maps\map_header.pxi -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_impl.pxi -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_init.pxi -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\sets\set_header.pxi -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_impl.pxi -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_init.pxi -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\unique\unique_impl.pxi -> build\lib.win-amd64-cpython-39\cykhash\unique
        running build_ext
        building 'cykhash.khashsets' extension
        error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for cykhash
    Building wheel for pyrobuf (setup.py): started
    Building wheel for pyrobuf (setup.py): finished with status 'error'
    error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [193 lines of output]
        C:\ProgramData\Anaconda3\envs\urbanity\lib\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
        !!

                ********************************************************************************
                Requirements should be satisfied by a PEP 517 installer.
                If you are using pip, you can try `pip install --use-pep517`.
                ********************************************************************************

        !!
          dist.fetch_build_eggs(dist.setup_requires)
        rendering 'pyrobuf_list.pyx' from 'C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\protobuf\templates\pyrobuf_list_pyx.tmpl'
        rendering 'pyrobuf_list.pxd' from 'C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\protobuf\templates\pyrobuf_list_pxd.tmpl'
        Compiling pyrobuf/src\pyrobuf_list.pyx because it changed.
        Compiling pyrobuf/src\pyrobuf_util.pyx because it depends on pyrobuf/src\pyrobuf_defs.pxi.
        [1/2] Cythonizing pyrobuf/src\pyrobuf_list.pyx
        c:\users\XXX\appdata\local\temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\.eggs\cython-3.0.2-py3.9-win-amd64.egg\Cython\Compiler\Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\src\pyrobuf_list.pxd
          tree = Parsing.p_module(s, pxd, full_module_name)
        [2/2] Cythonizing pyrobuf/src\pyrobuf_util.pyx
        c:\users\XXX\appdata\local\temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\.eggs\cython-3.0.2-py3.9-win-amd64.egg\Cython\Compiler\Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\src\pyrobuf_util.pxd
          tree = Parsing.p_module(s, pxd, full_module_name)
        warning: pyrobuf\src\pyrobuf_defs.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:4:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:5:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:6:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:7:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_util.pyx:7:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_util.pyx:9:13: Function signature does not match previous declaration
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build\lib.win-amd64-cpython-39
        creating build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\compile.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\parse_proto.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\setuptools_ext.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\__init__.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\__main__.py -> build\lib.win-amd64-cpython-39\pyrobuf
        creating build\lib.win-amd64-cpython-39\tests
        copying tests\conftest.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\create_message.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\performances.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\perf_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_bool_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_bytes_and_string_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_caching.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_custom_options.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_deprecated_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_field_defaults.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_has_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_has_field_many.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_imported_enums.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_issue_11.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_issue_69.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_is_initialized.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_items.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_merge_from.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message_field_types.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message_init_kwargs.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message_with_no_fields.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_nested_issue55.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_oneof.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_repeated_enum.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_signed_integer.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_typed_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_unicode_strings.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_unknown_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_varint_encoding.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\__init__.py -> build\lib.win-amd64-cpython-39\tests
        creating build\lib.win-amd64-cpython-39\pyrobuf\protobuf
        copying pyrobuf\protobuf\__init__.py -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf
        creating build\lib.win-amd64-cpython-39\tests\messages
        copying tests\messages\test_message_pb2.py -> build\lib.win-amd64-cpython-39\tests\messages
        copying tests\messages\test_ref_message_pb2.py -> build\lib.win-amd64-cpython-39\tests\messages
        copying tests\messages\__init__.py -> build\lib.win-amd64-cpython-39\tests\messages
        creating build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_field_validity.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_map_field.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_missing_lbraces.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_oneof.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_syntax.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\__init__.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        running egg_info
        writing pyrobuf.egg-info\PKG-INFO
        writing dependency_links to pyrobuf.egg-info\dependency_links.txt
        writing entry points to pyrobuf.egg-info\entry_points.txt
        writing requirements to pyrobuf.egg-info\requires.txt
        writing top-level names to pyrobuf.egg-info\top_level.txt
        reading manifest file 'pyrobuf.egg-info\SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        adding license file 'LICENSE'
        writing manifest file 'pyrobuf.egg-info\SOURCES.txt'
        C:\ProgramData\Anaconda3\envs\urbanity\lib\site-packages\setuptools\command\build_py.py:204: _Warning: Package 'pyrobuf.src' is absent from the `packages` configuration.
        !!

                ********************************************************************************
                ############################
                # Package would be ignored #
                ############################
                Python recognizes 'pyrobuf.src' as an importable package[^1],
                but it is absent from setuptools' `packages` configuration.

                This leads to an ambiguous overall configuration. If you want to distribute this
                package, please make sure that 'pyrobuf.src' is explicitly added
                to the `packages` configuration field.

                Alternatively, you can also rely on setuptools' discovery methods
                (for example by using `find_namespace_packages(...)`/`find_namespace:`
                instead of `find_packages(...)`/`find:`).

                You can read more about "package discovery" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

                If you don't want 'pyrobuf.src' to be distributed and are
                already explicitly excluding 'pyrobuf.src' via
                `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
                you can try to use `exclude_package_data`, or `include-package-data=False` in
                combination with a more fine grained `package-data` configuration.

                You can read more about "package data files" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

                [^1]: For Python, any directory (with suitable naming) can be imported,
                      even if it does not contain any `.py` files.
                      On the other hand, currently there is no concept of package data
                      directory, all directories are treated like packages.
                ********************************************************************************

        !!
          check.warn(importable)
        C:\ProgramData\Anaconda3\envs\urbanity\lib\site-packages\setuptools\command\build_py.py:204: _Warning: Package 'pyrobuf.protobuf.templates' is absent from the `packages` configuration.
        !!

                ********************************************************************************
                ############################
                # Package would be ignored #
                ############################
                Python recognizes 'pyrobuf.protobuf.templates' as an importable package[^1],
                but it is absent from setuptools' `packages` configuration.

                This leads to an ambiguous overall configuration. If you want to distribute this
                package, please make sure that 'pyrobuf.protobuf.templates' is explicitly added
                to the `packages` configuration field.

                Alternatively, you can also rely on setuptools' discovery methods
                (for example by using `find_namespace_packages(...)`/`find_namespace:`
                instead of `find_packages(...)`/`find:`).

                You can read more about "package discovery" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

                If you don't want 'pyrobuf.protobuf.templates' to be distributed and are
                already explicitly excluding 'pyrobuf.protobuf.templates' via
                `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
                you can try to use `exclude_package_data`, or `include-package-data=False` in
                combination with a more fine grained `package-data` configuration.

                You can read more about "package data files" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

                [^1]: For Python, any directory (with suitable naming) can be imported,
                      even if it does not contain any `.py` files.
                      On the other hand, currently there is no concept of package data
                      directory, all directories are treated like packages.
                ********************************************************************************

        !!
          check.warn(importable)
        creating build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_list.c -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_util.c -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\strndup.c -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\ansidecl.h -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_list.pxd -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_list.pyx -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_util.pxd -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_util.pyx -> build\lib.win-amd64-cpython-39\pyrobuf\src
        creating build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\proto_pxd.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\proto_pyx.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\pyrobuf_list_pxd.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\pyrobuf_list_pyx.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        running build_ext
        building 'pyrobuf_list' extension
        error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for pyrobuf
    Running setup.py clean for pyrobuf
  Failed to build cykhash pyrobuf
  ERROR: Could not build wheels for cykhash, pyrobuf, which is required to install pyproject.toml-based projects
  [end of output]

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

× pip subprocess to install build dependencies 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

winstonyym commented 1 year ago

Hi @DaveO1989 thank you for raising this issue. I am not able to reproduce your error with a fresh install.

I notice that you used the command: conda env update -f environment.yml. Perhaps you can try with just conda env create -f environment.yml. That might be the cause for error.

Before doing that, you should first remove the conda environment with conda env remove -n urbanity. If you installed a Jupyter kernel, you can remove it with jupyter kernelspec uninstall urbanity

If that still does not work, you might want to look at your version of setuptools. For reference, mine is version 65.5.0.

DaveO1989 commented 1 year ago

HI @winstonyym : Thanks for the quick answer. I set it up as well with a new environment and the "conda env create -f environment.yml" + I updated the setup tools on version 65.5.0 in the same environment. Unfortunately the error stays the same. Therefore I am unable to install the urbanity package. If anyone have a similar problem. I am thankful for some hints or advices. Thank you !

Joda0515 commented 1 year ago

Hello i tried to install the environment.yml as described, but I receive following error regarding the pip subprocess and therefore are unable to install the urbanity package. Does somebody has the same/similar issue?

As the error message advised I installed the Microsoft Visual C++ 14.0 compiler. But the issue with the pyrobuf package I couldn't solve. I tried to create the environment with the --use-pep517 - flag, but another error occured.

As well i tried not to create the environment.yml. instead set up a new conda environment and installed every single package with pip install > same issue with the urbanity package.

Do you have an easy solution for the problem or am I missing something here? Thanks in advance.

C:\ProgramData\Anaconda3\envs>conda env update -f environment.yml Collecting package metadata (repodata.json): done Solving environment: done Installing pip dependencies: \ Ran pip subprocess with arguments: ['C:\ProgramData\Anaconda3\envs\urbanity\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt'] Pip subprocess output: Collecting urbanity==0.3.13 (from -r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Obtaining dependency information for urbanity==0.3.13 from https://files.pythonhosted.org/packages/eb/69/174e81f6731264fb3cd668979230926601bd41553136a2d521d466cd1ac8/urbanity-0.3.13-py3-none-any.whl.metadata Using cached urbanity-0.3.13-py3-none-any.whl.metadata (875 bytes) Collecting charset-normalizer==2.1.1 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Collecting geopandas==0.12.0 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached geopandas-0.12.0-py3-none-any.whl (1.1 MB) Collecting ipykernel==6.16.2 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached ipykernel-6.16.2-py3-none-any.whl (138 kB) Collecting ipyleaflet==0.17.2 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached ipyleaflet-0.17.2-py3-none-any.whl (3.7 MB) Requirement already satisfied: ipywidgets==8.0.2 in c:\programdata\anaconda3\envs\urbanity\lib\site-packages (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) (8.0.2) Collecting mercantile<2.0.0,>=1.2.1 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached mercantile-1.2.1-py3-none-any.whl (14 kB) Collecting networkit==10.0 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached networkit-10.0-cp39-cp39-win_amd64.whl (21.0 MB) Collecting networkx==2.8.6 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached networkx-2.8.6-py3-none-any.whl (2.0 MB) Collecting numpy==1.23.3 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached numpy-1.23.3-cp39-cp39-win_amd64.whl (14.7 MB) Collecting protobuf==3.20.0 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached protobuf-3.20.0-cp39-cp39-win_amd64.whl (904 kB) Collecting pyrobuf==0.9.3 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached pyrobuf-0.9.3.tar.gz (258 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting pyrosm==0.6.1 (from urbanity==0.3.13->-r C:\ProgramData\Anaconda3\envs\condaenv.853_veqo.requirements.txt (line 1)) Using cached pyrosm-0.6.1.tar.gz (2.1 MB) Installing build dependencies: started Installing build dependencies: finished with status 'error'

Pip subprocess error: error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [298 lines of output] Collecting setuptools Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/4f/ab/0bcfebdfc3bfa8554b2b2c97a555569c4c1ebc74ea288741ea8326c51906/setuptools-68.1.2-py3-none-any.whl.metadata Using cached setuptools-68.1.2-py3-none-any.whl.metadata (6.2 kB) Collecting wheel Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB) Collecting Cython Obtaining dependency information for Cython from https://files.pythonhosted.org/packages/f9/20/400f5caa238051c54534f8ae76f9b2fcf1cd4171e7eba8d50f0066aff2ba/Cython-3.0.2-cp39-cp39-win_amd64.whl.metadata Using cached Cython-3.0.2-cp39-cp39-win_amd64.whl.metadata (3.2 kB) Collecting cykhash Using cached cykhash-2.0.1.tar.gz (44 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 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting pyrobuf Using cached pyrobuf-0.9.3.tar.gz (258 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting jinja2>=2.8 (from pyrobuf) Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Collecting MarkupSafe>=2.0 (from jinja2>=2.8->pyrobuf) Obtaining dependency information for MarkupSafe>=2.0 from https://files.pythonhosted.org/packages/a2/b2/624042cb58cc6b3529a6c3a7b7d230766e3ecb768cba118ba7befd18ed6f/MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl.metadata Using cached MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl.metadata (3.1 kB) Using cached setuptools-68.1.2-py3-none-any.whl (805 kB) Using cached wheel-0.41.2-py3-none-any.whl (64 kB) Using cached Cython-3.0.2-cp39-cp39-win_amd64.whl (2.8 MB) Using cached MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl (17 kB) Building wheels for collected packages: cykhash, pyrobuf Building wheel for cykhash (pyproject.toml): started Building wheel for cykhash (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

    × Building wheel for cykhash (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [49 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build\lib.win-amd64-cpython-39
        creating build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\compat.py -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\__init__.py -> build\lib.win-amd64-cpython-39\cykhash
        running egg_info
        writing src\cykhash.egg-info\PKG-INFO
        writing dependency_links to src\cykhash.egg-info\dependency_links.txt
        writing top-level names to src\cykhash.egg-info\top_level.txt
        reading manifest file 'src\cykhash.egg-info\SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        adding license file 'LICENSE'
        writing manifest file 'src\cykhash.egg-info\SOURCES.txt'
        copying src\cykhash\common.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\floatdef.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\hash_functions.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khash.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashmaps.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashmaps.pyx -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashsets.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\khashsets.pyx -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\memory.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\murmurhash.pxi -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\unique.pxd -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\unique.pyx -> build\lib.win-amd64-cpython-39\cykhash
        copying src\cykhash\utils.pyx -> build\lib.win-amd64-cpython-39\cykhash
        creating build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_header.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_impl.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_init.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\maps
        creating build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_header.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_impl.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_init.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\sets
        creating build\lib.win-amd64-cpython-39\cykhash\unique
        copying src\cykhash\unique\unique_impl.pxi.in -> build\lib.win-amd64-cpython-39\cykhash\unique
        copying src\cykhash\maps\map_header.pxi -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_impl.pxi -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\maps\map_init.pxi -> build\lib.win-amd64-cpython-39\cykhash\maps
        copying src\cykhash\sets\set_header.pxi -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_impl.pxi -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\sets\set_init.pxi -> build\lib.win-amd64-cpython-39\cykhash\sets
        copying src\cykhash\unique\unique_impl.pxi -> build\lib.win-amd64-cpython-39\cykhash\unique
        running build_ext
        building 'cykhash.khashsets' extension
        error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for cykhash
    Building wheel for pyrobuf (setup.py): started
    Building wheel for pyrobuf (setup.py): finished with status 'error'
    error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [193 lines of output]
        C:\ProgramData\Anaconda3\envs\urbanity\lib\site-packages\setuptools\__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
        !!

                ********************************************************************************
                Requirements should be satisfied by a PEP 517 installer.
                If you are using pip, you can try `pip install --use-pep517`.
                ********************************************************************************

        !!
          dist.fetch_build_eggs(dist.setup_requires)
        rendering 'pyrobuf_list.pyx' from 'C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\protobuf\templates\pyrobuf_list_pyx.tmpl'
        rendering 'pyrobuf_list.pxd' from 'C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\protobuf\templates\pyrobuf_list_pxd.tmpl'
        Compiling pyrobuf/src\pyrobuf_list.pyx because it changed.
        Compiling pyrobuf/src\pyrobuf_util.pyx because it depends on pyrobuf/src\pyrobuf_defs.pxi.
        [1/2] Cythonizing pyrobuf/src\pyrobuf_list.pyx
        c:\users\XXX\appdata\local\temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\.eggs\cython-3.0.2-py3.9-win-amd64.egg\Cython\Compiler\Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\src\pyrobuf_list.pxd
          tree = Parsing.p_module(s, pxd, full_module_name)
        [2/2] Cythonizing pyrobuf/src\pyrobuf_util.pyx
        c:\users\XXX\appdata\local\temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\.eggs\cython-3.0.2-py3.9-win-amd64.egg\Cython\Compiler\Main.py:384: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\XXX\AppData\Local\Temp\pip-install-dzj9isvb\pyrobuf_5eb883ccd5ea4263b5cd82138c857682\pyrobuf\src\pyrobuf_util.pxd
          tree = Parsing.p_module(s, pxd, full_module_name)
        warning: pyrobuf\src\pyrobuf_defs.pxi:3:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:4:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:5:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:6:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_defs.pxi:7:0: The 'DEF' statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_util.pyx:7:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
        warning: pyrobuf\src\pyrobuf_util.pyx:9:13: Function signature does not match previous declaration
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build\lib.win-amd64-cpython-39
        creating build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\compile.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\parse_proto.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\setuptools_ext.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\__init__.py -> build\lib.win-amd64-cpython-39\pyrobuf
        copying pyrobuf\__main__.py -> build\lib.win-amd64-cpython-39\pyrobuf
        creating build\lib.win-amd64-cpython-39\tests
        copying tests\conftest.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\create_message.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\performances.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\perf_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_bool_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_bytes_and_string_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_caching.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_custom_options.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_deprecated_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_field_defaults.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_has_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_has_field_many.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_imported_enums.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_issue_11.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_issue_69.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_is_initialized.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_items.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_merge_from.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message_field_types.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message_init_kwargs.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_message_with_no_fields.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_nested_issue55.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_oneof.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_repeated_enum.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_signed_integer.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_typed_lists.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_unicode_strings.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_unknown_field.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\test_varint_encoding.py -> build\lib.win-amd64-cpython-39\tests
        copying tests\__init__.py -> build\lib.win-amd64-cpython-39\tests
        creating build\lib.win-amd64-cpython-39\pyrobuf\protobuf
        copying pyrobuf\protobuf\__init__.py -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf
        creating build\lib.win-amd64-cpython-39\tests\messages
        copying tests\messages\test_message_pb2.py -> build\lib.win-amd64-cpython-39\tests\messages
        copying tests\messages\test_ref_message_pb2.py -> build\lib.win-amd64-cpython-39\tests\messages
        copying tests\messages\__init__.py -> build\lib.win-amd64-cpython-39\tests\messages
        creating build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_field_validity.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_map_field.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_missing_lbraces.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_oneof.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\test_syntax.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        copying tests\test_parser\__init__.py -> build\lib.win-amd64-cpython-39\tests\test_parser
        running egg_info
        writing pyrobuf.egg-info\PKG-INFO
        writing dependency_links to pyrobuf.egg-info\dependency_links.txt
        writing entry points to pyrobuf.egg-info\entry_points.txt
        writing requirements to pyrobuf.egg-info\requires.txt
        writing top-level names to pyrobuf.egg-info\top_level.txt
        reading manifest file 'pyrobuf.egg-info\SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        adding license file 'LICENSE'
        writing manifest file 'pyrobuf.egg-info\SOURCES.txt'
        C:\ProgramData\Anaconda3\envs\urbanity\lib\site-packages\setuptools\command\build_py.py:204: _Warning: Package 'pyrobuf.src' is absent from the `packages` configuration.
        !!

                ********************************************************************************
                ############################
                # Package would be ignored #
                ############################
                Python recognizes 'pyrobuf.src' as an importable package[^1],
                but it is absent from setuptools' `packages` configuration.

                This leads to an ambiguous overall configuration. If you want to distribute this
                package, please make sure that 'pyrobuf.src' is explicitly added
                to the `packages` configuration field.

                Alternatively, you can also rely on setuptools' discovery methods
                (for example by using `find_namespace_packages(...)`/`find_namespace:`
                instead of `find_packages(...)`/`find:`).

                You can read more about "package discovery" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

                If you don't want 'pyrobuf.src' to be distributed and are
                already explicitly excluding 'pyrobuf.src' via
                `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
                you can try to use `exclude_package_data`, or `include-package-data=False` in
                combination with a more fine grained `package-data` configuration.

                You can read more about "package data files" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

                [^1]: For Python, any directory (with suitable naming) can be imported,
                      even if it does not contain any `.py` files.
                      On the other hand, currently there is no concept of package data
                      directory, all directories are treated like packages.
                ********************************************************************************

        !!
          check.warn(importable)
        C:\ProgramData\Anaconda3\envs\urbanity\lib\site-packages\setuptools\command\build_py.py:204: _Warning: Package 'pyrobuf.protobuf.templates' is absent from the `packages` configuration.
        !!

                ********************************************************************************
                ############################
                # Package would be ignored #
                ############################
                Python recognizes 'pyrobuf.protobuf.templates' as an importable package[^1],
                but it is absent from setuptools' `packages` configuration.

                This leads to an ambiguous overall configuration. If you want to distribute this
                package, please make sure that 'pyrobuf.protobuf.templates' is explicitly added
                to the `packages` configuration field.

                Alternatively, you can also rely on setuptools' discovery methods
                (for example by using `find_namespace_packages(...)`/`find_namespace:`
                instead of `find_packages(...)`/`find:`).

                You can read more about "package discovery" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

                If you don't want 'pyrobuf.protobuf.templates' to be distributed and are
                already explicitly excluding 'pyrobuf.protobuf.templates' via
                `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
                you can try to use `exclude_package_data`, or `include-package-data=False` in
                combination with a more fine grained `package-data` configuration.

                You can read more about "package data files" on setuptools documentation page:

                - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

                [^1]: For Python, any directory (with suitable naming) can be imported,
                      even if it does not contain any `.py` files.
                      On the other hand, currently there is no concept of package data
                      directory, all directories are treated like packages.
                ********************************************************************************

        !!
          check.warn(importable)
        creating build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_list.c -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_util.c -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\strndup.c -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\ansidecl.h -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_list.pxd -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_list.pyx -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_util.pxd -> build\lib.win-amd64-cpython-39\pyrobuf\src
        copying pyrobuf\src\pyrobuf_util.pyx -> build\lib.win-amd64-cpython-39\pyrobuf\src
        creating build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\proto_pxd.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\proto_pyx.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\pyrobuf_list_pxd.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        copying pyrobuf\protobuf\templates\pyrobuf_list_pyx.tmpl -> build\lib.win-amd64-cpython-39\pyrobuf\protobuf\templates
        running build_ext
        building 'pyrobuf_list' extension
        error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for pyrobuf
    Running setup.py clean for pyrobuf
  Failed to build cykhash pyrobuf
  ERROR: Could not build wheels for cykhash, pyrobuf, which is required to install pyproject.toml-based projects
  [end of output]

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

× pip subprocess to install build dependencies 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 error message indicates that you encountered a problem while attempting to build some Python extension modules, which require Microsoft Visual C++ 14.0 or higher to compile. This problem usually occurs on Windows systems when you try to install some Python packages that need to be compiled.

The solution to this error is to install Microsoft Visual C++ Build Tools. You can download and install it by clicking on the link provided in the error message hxxps://visualstudio.microsoft.com/visual-cpp-build-tools/ (note that you need to change hxxps to https).

The steps to install Microsoft Visual C++ Build Tools are as follows:

  1. Visit the link above and click the "Download" button.

  2. On the page that opens, select "Use workload", then under the "Windows" tab, select "C++ build tools".

  3. Check the options for "MSVC v142 - VS 2019 C++ x64/x86 build tools" and "Windows 10 SDK", then click "Install".

After the installation is complete, try your installation command again, and you should no longer encounter this error. If the problem persists, you may need to restart your computer to ensure that the newly installed tools are correctly recognized.

winstonyym commented 1 year ago

@Joda0515 thank you very much for helping to look at this issue and for sharing this useful information. As a MacOS user, I am not so familiar with this issue. I really appreciate your help. @DaveO1989, hope this helps to address your issue!

Ultios commented 11 months ago

I've also encountered the same error in my windows, is there any straightforward way to install without having workaround as stated by @Joda0515 ? Can it stated in the environment.yml that it required visual c++ update?

Jigeeshu commented 8 months ago

I have the same problem, would be very useful if a workaround like the one suggested by @Ultios is provided