PucklaJ / dynareadout

High-Performance C/C++ library for parsing binary output files and key files of LS Dyna (d3plot, binout, input deck)
zlib License
16 stars 5 forks source link

unable to install python version #27

Closed siraj-samsudeen closed 11 months ago

siraj-samsudeen commented 11 months ago

When I ran python -m pip install dynareadout, I got the following error - can you please help - my python version 3.11 installed using homebrew on Apple M2 macbook.

Collecting dynareadout
  Using cached dynareadout-23.9.tar.gz (263 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: dynareadout
  Building wheel for dynareadout (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for dynareadout (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [129 lines of output]
      /opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/dist.py:508: InformationOnly: Normalizing '23.09' to '23.9'

....lines skipped

      creating build/temp.macosx-13-arm64-cpython-311/lib/dynareadout/src
      creating build/temp.macosx-13-arm64-cpython-311/lib/dynareadout/src/cpp
      creating build/temp.macosx-13-arm64-cpython-311/lib/dynareadout/src/python
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/private/var/folders/23/w90hm_q56yx4xr8q2hmgyz1m0000gn/T/pip-install-wqoe_4w7/dynareadout_e5d70df149a647baa6a951f5acff44e3/lib/pybind11/include -Ilib/dynareadout/src -Ilib/dynareadout/src/cpp -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c lib/dynareadout/src/binary_search.c -o build/temp.macosx-13-arm64-cpython-311/lib/dynareadout/src/binary_search.o -std=c++17 -w -DTHREAD_SAFE
      error: invalid argument '-std=c++17' not allowed with 'C'
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dynareadout
Failed to build dynareadout
ERROR: Could not build wheels for dynareadout, which is required to install pyproject.toml-based projects
PucklaJ commented 11 months ago

Thank you for reporting! I already know what the problem is. I am on it.

PucklaJ commented 11 months ago

I fixed it in the python version. This fix will become available at the end of the month when I create a new release, but if you can't wait you can build it yourself using the following instructions:

# First clone the python package source code
git clone --recursive  https://github.com/PucklaJ/dynareadout_python.git
# Navigate into the new folder
cd dynareadout_python
# Install setuptools (probably already installed)
python -m pip install setuptools
# Install the package
python setup.py install
siraj-samsudeen commented 11 months ago

Thank you so much Jonas. Let me wait for your release as I am able to use lasso-python to read d3plot for now. If I need it earlier, I would use your instructions to build it myself. Thank you for the immediate response and have a nice day, Jonas.

From: Jonas Pucher @.> Date: Friday, 20 October 2023 at 2:52 PM To: PucklaJ/dynareadout @.> Cc: Siraj Samsudeen @.>, Author @.> Subject: Re: [PucklaJ/dynareadout] unable to install python version (Issue #27)

I fixed it in the python versionhttps://github.com/PucklaJ/dynareadout_python. This fix will become available at the end of the month when I create a new release, but if you can't wait you can build it yourself using the following instructions:

First clone the python package source code

git clone --recursive https://github.com/PucklaJ/dynareadout_python.git

Navigate into the new folder

cd dynareadout_python

Install setuptools (probably already installed)

python -m pip install setuptools

Install the package

python setup.py install

— Reply to this email directly, view it on GitHubhttps://github.com/PucklaJ/dynareadout/issues/27#issuecomment-1772382981, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC23ZFKLBAI2DU6JG3GUWKTYAI7ERAVCNFSM6AAAAAA6G4M4M6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZSGM4DEOJYGE. You are receiving this because you authored the thread.Message ID: @.***>