Skip to content

Error installing pyswmm on macOS Ventura" #112

Closed

Description

@ddspot

Describe the bug
I tried installing pyswmm on a macOS venutura. The following error was raised: subprocess-exited-with-error and metadata-generation-failed. Here is the full error log:

× python setup.py egg_info did not run successfully.
│
exit code: 1
╰─> [8 lines of output]
running egg_info
creating /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info
writing /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/dependency_links.txt
writing requirements to /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/requires.txt
writing top-level names to /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/top_level.txt
writing manifest file '/private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/SOURCES.txt
error: package directory 'lib' does not exist
[end of output]

To Reproduce
Notes:

  • I tried to install pyswmm in a virtual environment using pip install pyswwm.
  • Also tried using pip install git+https://github.com/OpenWaterAnalytics/pyswmm.git
  • Both produced the same error as stated above

Desktop (please complete the following information):

  • OS: [ MacOS Ventura]
  • Python Version [e.g. Python 3.10.11]
  • PySWMM Version [1.4.0]

Please let me know how to go about getting this to work. Many thanks in advance.

Activity

  1. bemcdonnell commented on May 5, 2023

    @bemcdonnell
    Member

    @ddspot, I’m going to move this issue to SWMM-toolkit since it seems to be the problem. Meanwhile, could you try to pip install swmm-toolkit?

  2. transferred this issue frompyswmm/pyswmmon May 5, 2023
  3. ddspot commented on May 5, 2023

    @ddspot
    Author

    @bemcdonnell, thank you for your rapid response. I tried this as well and got the same error as mentioned above.

  4. bemcdonnell commented on May 5, 2023

    @bemcdonnell
    Member

    @ddspot let me look into this and catch up with our collaborators @abhiramm7 and @karosc when they start their workday. I am currently on Big Sur and have no issues with the install. If you want to try building the wheel yourself, that would be worth a try.

  5. bemcdonnell commented on May 5, 2023

    @bemcdonnell
    Member

    @ddspot which processor do you have? Intel, M1 or M2? I'm just trying to get as much information as possible.

  6. ddspot commented on May 5, 2023

    @ddspot
    Author
  7. bemcdonnell commented on May 5, 2023

    @bemcdonnell
    Member

    @ddspot I wrote a quick guide that might be helpful. My collaborators might laugh at me for reinventing the wheel here but I did manage to get it to build. However, I have never tried building on M1 or M2 so I have no idea what you should expect. I documented the work-around for the ninja build tool. We have not officially started supporting M1 or M2 so if you run the regression tests, let us know what you discover!

    build_swmm-toolkit_wheel_v1_20230505.pdf

  8. abhiramm7 commented on May 5, 2023

    @abhiramm7
    Collaborator

    @ddspot You should be able to build it by bypassing OpenMP. https://randomstorms.net/logs/build/compile_swmm_python.html outlines the process for building it on M1, it should be the same. Note, instead of downloading the version of swmm-python in the post, I would recommend that you download the most recent release and update the CMakeLists file. Once you download the swmm-python, update the CMakeLists.txt to skip the search for OpenMP flags. Here is an example https://github.com/abhiramm7/swmm-python/blob/dev/swmm-toolkit/CMakeLists.txt#LL40C1-L48C8.

    I hope this helps :).

  9. bemcdonnell commented on May 5, 2023

    @bemcdonnell
    Member

    @abhiramm7 - you are the collaborator who should issue beaucoup laughter at my guide. :-)

    I propose we add support for M1/M2 to the project! @abhiramm7 would you be open to helping this happen?

  10. abhiramm7 commented on May 5, 2023

    @abhiramm7
    Collaborator

    @bemcdonnell Yes, I'd love to. I think @cbuahin already figured it out; he wanted to make a couple of changes to build it into a more robust thing. I can help pull that in 🕺🏼 .

  11. bemcdonnell commented on May 6, 2023

    @bemcdonnell
    Member

    @ddspot how did the process work for you? Any feed back?

  12. ddspot commented on May 6, 2023

    @ddspot
    Author
  13. abhiramm7 commented on May 6, 2023

    @abhiramm7
    Collaborator

    Describe the bug I tried installing pyswmm on a macOS venutura. The following error was raised: subprocess-exited-with-error and metadata-generation-failed. Here is the full error log:

    × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [8 lines of output] running egg_info creating /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info writing /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/PKG-INFO writing dependency_links to /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/dependency_links.txt writing requirements to /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/requires.txt writing top-level names to /private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/top_level.txt writing manifest file '/private/var/folders/ft/8qzbkr994y9gmhkqb5l97lsw0000gq/T/pip-pip-egg-info-h21wwx37/swmm_toolkit.egg-info/SOURCES.txt error: package directory 'lib' does not exist [end of output]

    To Reproduce Notes:

    • I tried to install pyswmm in a virtual environment using pip install pyswwm.
    • Also tried using pip install git+https://github.com/OpenWaterAnalytics/pyswmm.git
    • Both produced the same error as stated above

    Desktop (please complete the following information):

    • OS: [ MacOS Ventura]
    • Python Version [e.g. Python 3.10.11]
    • PySWMM Version [1.4.0]

    Please let me know how to go about getting this to work. Many thanks in advance.

    try brew install lit and rerun the python setup.py build

    Make sure you disable openmp in cmake. I just tested it on Ventura seems to be working

  14. ddspot commented on May 6, 2023

    @ddspot
    Author

    @abhiramm7 Many thanks; it's working now. Disabling openmp in cmakelist.txt was key (somehow I missed that from your previous comment)

    Many thanks, @bemcdonnell and @abhiramm7 for the quick response and support in solving this issue.

  15. bemcdonnell commented on May 6, 2023

    @bemcdonnell
    Member

    @abhiramm7 is the hero and winner in this case!!! 🤣🤣🤣

  16. locked and limited conversation to collaborators on May 7, 2023
  17. converted this issue into a discussion #113 on May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions