holzschu / Carnets

Carnets is a stand-alone Jupyter notebook server and client. Edit your notebooks on the go, even where there is no network.
https://holzschu.github.io/Carnets_Jupyter/
BSD 3-Clause "New" or "Revised" License
567 stars 34 forks source link

Pyreadstat #261

Open mncam opened 2 years ago

mncam commented 2 years ago

I can’t install pyreadstat. When I run pip install pyreadstat, I get this message: `Defaulting to user installation because normal site-packages is not writeable Collecting pyreadstat Using cached pyreadstat-1.1.9.tar.gz (451 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: pandas>=1.2.0 in /private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/lib/python3.9/site-packages/pandas-1.4.2-py3.9-macosx-11.5-x86_64.egg (from pyreadstat) (1.4.2) Requirement already satisfied: python-dateutil>=2.8.1 in /private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/lib/python3.9/site-packages (from pandas>=1.2.0->pyreadstat) (2.8.2) Requirement already satisfied: pytz>=2020.1 in /private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/lib/python3.9/site-packages (from pandas>=1.2.0->pyreadstat) (2022.1) Requirement already satisfied: numpy>=1.18.5 in /private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/lib/python3.9/site-packages (from pandas>=1.2.0->pyreadstat) (1.24.0.dev0+156.g32efd2a95) Requirement already satisfied: six>=1.5 in /private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/lib/python3.9/site-packages (from python-dateutil>=2.8.1->pandas>=1.2.0->pyreadstat) (1.16.0) Building wheels for collected packages: pyreadstat Building wheel for pyreadstat (setup.py): started Building wheel for pyreadstat (setup.py): finished with status 'error'

error: subprocess-exited-with-error

Running setup.py clean for pyreadstat

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [22 lines of output] [1/3] Cythonizing pyreadstat/_readstat_parser.pyx [2/3] Cythonizing pyreadstat/_readstat_writer.pyx [3/3] Cythonizing pyreadstat/pyreadstat.pyx running bdist_wheel running build running build_py creating build creating build/lib.macosx-12.4-arm64-cpython-39 creating build/lib.macosx-12.4-arm64-cpython-39/pyreadstat copying pyreadstat/worker.py -> build/lib.macosx-12.4-arm64-cpython-39/pyreadstat copying pyreadstat/init.py -> build/lib.macosx-12.4-arm64-cpython-39/pyreadstat running build_ext building 'pyreadstat.pyreadstat' extension creating build/temp.macosx-12.4-arm64-cpython-39 creating build/temp.macosx-12.4-arm64-cpython-39/src creating build/temp.macosx-12.4-arm64-cpython-39/src/sas creating build/temp.macosx-12.4-arm64-cpython-39/src/spss creating build/temp.macosx-12.4-arm64-cpython-39/src/stata creating build/temp.macosx-12.4-arm64-cpython-39/pyreadstat clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O3 -Wall -miphoneos-version-min=14.0 -I./pyreadstat -Isrc -Isrc/sas -Isrc/spss -Isrc/stata -Ipyreadstat -I. -I/private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/include/python3.9 -c ./src/CKHashTable.c -o build/temp.macosx-12.4-arm64-cpython-39/./src/CKHashTable.o -Ireadstat -DHAVE_ZLIB=1 clang: command not found error: command 'clang' failed with exit code 127 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyreadstat

Failed to build pyreadstat Installing collected packages: pyreadstat Running setup.py install for pyreadstat: started Running setup.py install for pyreadstat: finished with status 'error'

error: subprocess-exited-with-error

× Running setup.py install for pyreadstat did not run successfully. │ exit code: 1 ╰─> [24 lines of output] [1/3] Cythonizing pyreadstat/_readstat_parser.pyx [2/3] Cythonizing pyreadstat/_readstat_writer.pyx [3/3] Cythonizing pyreadstat/pyreadstat.pyx running install /private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build/lib.macosx-12.4-arm64-cpython-39 creating build/lib.macosx-12.4-arm64-cpython-39/pyreadstat copying pyreadstat/worker.py -> build/lib.macosx-12.4-arm64-cpython-39/pyreadstat copying pyreadstat/init.py -> build/lib.macosx-12.4-arm64-cpython-39/pyreadstat running build_ext building 'pyreadstat.pyreadstat' extension creating build/temp.macosx-12.4-arm64-cpython-39 creating build/temp.macosx-12.4-arm64-cpython-39/src creating build/temp.macosx-12.4-arm64-cpython-39/src/sas creating build/temp.macosx-12.4-arm64-cpython-39/src/spss creating build/temp.macosx-12.4-arm64-cpython-39/src/stata creating build/temp.macosx-12.4-arm64-cpython-39/pyreadstat clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O3 -Wall -miphoneos-version-min=14.0 -I./pyreadstat -Isrc -Isrc/sas -Isrc/spss -Isrc/stata -Ipyreadstat -I. -I/private/var/containers/Bundle/Application/BD0ED004-0CE8-4A9E-BAC9-0AB914436517/Carnets.app/Library/include/python3.9 -c ./src/CKHashTable.c -o build/temp.macosx-12.4-arm64-cpython-39/./src/CKHashTable.o -Ireadstat -DHAVE_ZLIB=1 clang: command not found error: command 'clang' failed with exit code 127 [end of output]

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

× Encountered error while trying to install package. ╰─> pyreadstat

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

Note: you may need to restart the kernel to use updated packages.`

How can I solve problem?

holzschu commented 2 years ago

The error message gives the answer: pyreadstat has some components written in C (in cython, actually), and the installer is trying to compile them. Since there are no compilers available for iOS, the install process fails. I'm afraid there are no easy solutions here.