Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: install issues on M1 mac #3592

Closed
tylerjereddy opened this issue Apr 2, 2022 · 13 comments
Closed

BLD: install issues on M1 mac #3592

tylerjereddy opened this issue Apr 2, 2022 · 13 comments

Comments

@tylerjereddy
Copy link
Member

python3 setup.py install --user on the gcc compile farm M1 machine manages to build MDAnalysis, but then it tries to install deps, and gsd cannot be built from source:

Searching for gsd>=1.4.0
Reading https://pypi.org/simple/gsd/
Downloading https://files.pythonhosted.org/packages/bd/65/55fec6a39f02aae7c460ce2bbceb7159ce2a3ba461738dd66a8b15a643b0/gsd-2.5.1.tar.gz#sha256=76bf228b1d8e95e7d6a334e8cc7712c0bd8c256148007f7ce88a489c21996593
Best match: gsd 2.5.1
Processing gsd-2.5.1.tar.gz
Writing /var/folders/47/rvvzxnmx61x7n_btlv6p4tn800017l/T/easy_install-ta94os9x/gsd-2.5.1/setup.cfg
Running gsd-2.5.1/setup.py -q bdist_egg --dist-dir /var/folders/47/rvvzxnmx61x7n_btlv6p4tn800017l/T/easy_install-ta94os9x/gsd-2.5.1/egg-dist-tmp-r5m66yf9
Compiling gsd/fl.pyx because it depends on /Users/treddy/Library/Python/3.8/lib/python/site-packages/Cython/Includes/libc/string.pxd.
[1/1] Cythonizing gsd/fl.pyx
package init file 'gsd/test/__init__.py' not found (or not a regular file)
warning: no files found matching 'ChangeLog.md'
gsd/fl.c:11582:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
1 warning generated.
gsd/fl.c:11582:3: warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
  0, /*tp_print*/
  ^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/cpython/object.h:260:5: note: 'tp_print' has been explicitly marked deprecated here
    Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
    ^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/pyport.h:515:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                     ^
1 warning generated.
gsd/gsd.c:981:44: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_read == -1 || bytes_read != bytes_to_copy)
                                ~~~~~~~~~~ ^  ~~~~~~~~~~~~~
gsd/gsd.c:992:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != bytes_to_copy)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
gsd/gsd.c:1018:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != bytes_to_copy)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
gsd/gsd.c:1106:46: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
    if (bytes_written == -1 || bytes_written != handle->write_buffer.size)
                               ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:1198:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != handle->file_names.data.reserved)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:1231:27: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
        if (bytes_written != (handle->file_names.data.reserved - old_size))
            ~~~~~~~~~~~~~ ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:1467:40: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
    if (bytes_read == -1 || bytes_read != namelist_n_bytes)
                            ~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
gsd/gsd.c:1893:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != bytes_to_write)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
gsd/gsd.c:2016:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != size)
                                   ~~~~~~~~~~~~~ ^  ~~~~
gsd/gsd.c:2168:40: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
    if (bytes_read == -1 || bytes_read != size)
                            ~~~~~~~~~~ ^  ~~~~
gsd/gsd.c:2344:54: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
            if (bytes_written == -1 || bytes_written != sizeof(struct gsd_index_entry) * buf.size)
                                       ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:2399:54: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (bytes_written == -1 || bytes_written != new_name_buf.reserved)
                                       ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
12 warnings generated.
gsd/gsd.c:981:44: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_read == -1 || bytes_read != bytes_to_copy)
                                ~~~~~~~~~~ ^  ~~~~~~~~~~~~~
gsd/gsd.c:992:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != bytes_to_copy)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
gsd/gsd.c:1018:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != bytes_to_copy)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
gsd/gsd.c:1106:46: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
    if (bytes_written == -1 || bytes_written != handle->write_buffer.size)
                               ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:1198:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != handle->file_names.data.reserved)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:1231:27: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
        if (bytes_written != (handle->file_names.data.reserved - old_size))
            ~~~~~~~~~~~~~ ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:1467:40: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
    if (bytes_read == -1 || bytes_read != namelist_n_bytes)
                            ~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~
gsd/gsd.c:1893:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != bytes_to_write)
                                   ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
gsd/gsd.c:2016:50: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
        if (bytes_written == -1 || bytes_written != size)
                                   ~~~~~~~~~~~~~ ^  ~~~~
gsd/gsd.c:2168:40: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
    if (bytes_read == -1 || bytes_read != size)
                            ~~~~~~~~~~ ^  ~~~~
gsd/gsd.c:2344:54: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
            if (bytes_written == -1 || bytes_written != sizeof(struct gsd_index_entry) * buf.size)
                                       ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gsd/gsd.c:2399:54: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
            if (bytes_written == -1 || bytes_written != new_name_buf.reserved)
                                       ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
12 warnings generated.
error: Setup script exited with error: SandboxViolation: mkdir('/Users/treddy/Library/Caches/com.apple.python/private/var/folders/47/rvvzxnmx61x7n_btlv6p4tn800017l/T/easy_install-ta94os9x', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
@tylerjereddy tylerjereddy changed the title BLD: setup.py gsd issue on M1 mac BLD: install issues on M1 mac Apr 2, 2022
@tylerjereddy
Copy link
Member Author

For the modern/PEP-compliant python3 -m pip install . type build, it is clear that pyproject.toml needs some updating for M1:

treddy@minimac package % python3 -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /Users/treddy/github_projects/mdanalysis/package
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 255
  ╰─> [6 lines of output]
      Attempting to autodetect OpenMP support... Did not detect OpenMP support.
      No openmp compatible compiler found default to serial build.
      Will attempt to use Cython.
      *** package "numpy" not found ***
      MDAnalysis requires a version of NumPy (>=1.18.0), even for setup.
      Please get it from http://numpy.scipy.org/ or install it through your package manager.
      [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: 255
╰─> See above for output.

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

@tylerjereddy
Copy link
Member Author

Looks like pretty much all deps are "ok" apart from gsd. When I try to run the testsuite I get:

ModuleNotFoundError: No module named 'gsd'.

@tylerjereddy
Copy link
Member Author

I can probably tackle the pyproject.toml stuff a bit tomorrow, but as for gsd.. report it to them or make sure it is optional for this architecture if possible?

@IAlibay
Copy link
Member

IAlibay commented Apr 2, 2022

We should just make gsd optional at this point, we do so for h5md, don't know why it has to be a core dependency.

@orbeckst
Copy link
Member

orbeckst commented Apr 2, 2022

I agree, we have more experience now with making deps optional.

@tylerjereddy
Copy link
Member Author

that said, I do have gsd working on M1 Mac now, as long as I used the pip install . instead of setup.py (deprecated) route

IAlibay pushed a commit that referenced this issue Apr 8, 2022
Partly addresses #3592

* BLD: improve M1 build support

* the changes here allow me to build MDAnalysis and its
dependencies on an M1 Mac on the gcc compile farm using
`python3 -m pip install --user .`

* the full test suite passes, except for 1 extra `xfail`
I've added in here--which is also documented by gh-1389
(it has apparently been failing on "exotic platforms"
for almost 5 years). Issue re-raised as #3599
@IAlibay
Copy link
Member

IAlibay commented Jun 1, 2022

@mikemhenry tested the 2.2.0 testpypi build and noticed that there were some issues with pip installing scipy. Is this a known issue on M1 @tylerjereddy ?

@tylerjereddy
Copy link
Member Author

@IAlibay which version of SciPy? do you have a traceback? we should be solid on M1 for SciPy--there are binary wheels available

@IAlibay
Copy link
Member

IAlibay commented Jun 1, 2022

@tylerjereddy from Mike:

lilmac@lilmac mdanalysis % pip install scipy      
Collecting scipy
  Using cached scipy-1.8.1.tar.gz (38.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [180 lines of output]
      setup.py:486: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/nb/w5j42j713y5gvc3ny3kxlx140000gn/T/pip-modern-metadata-9uslnk74'), proceeding with generating Cython sources and expanding templates
        warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
      Running from SciPy source directory.
      Running scipy/linalg/_generate_pyx.py
      Running scipy/special/_generate_pyx.py
      Running scipy/stats/_generate_pyx.py
      Processing scipy/cluster/_vq.pyx
      Processing scipy/cluster/_optimal_leaf_ordering.pyx
      Processing scipy/cluster/_hierarchy.pyx
      Processing scipy/ndimage/src/_cytest.pyx
      Processing scipy/ndimage/src/_ni_label.pyx
      Processing scipy/linalg/cython_lapack.pyx
      Processing scipy/linalg/_matfuncs_sqrtm_triu.pyx
      Processing scipy/linalg/_cythonized_array_utils.pyx
      Processing scipy/linalg/_solve_toeplitz.pyx
      Processing scipy/linalg/cython_blas.pyx
      Processing scipy/linalg/_decomp_update.pyx.in
      Processing scipy/optimize/_group_columns.pyx
      Processing scipy/optimize/_bglu_dense.pyx
      Processing scipy/optimize/_trlib/_trlib.pyx
      Processing scipy/optimize/_highs/cython/src/_highs_constants.pyx
      Processing scipy/optimize/_highs/cython/src/_highs_wrapper.pyx
      Processing scipy/optimize/_lsq/givens_elimination.pyx
      Processing scipy/optimize/cython_optimize/_zeros.pyx.in
      Processing scipy/optimize/tnc/_moduleTNC.pyx
      Processing scipy/io/matlab/_streams.pyx
      Processing scipy/io/matlab/_mio_utils.pyx
      Processing scipy/io/matlab/_mio5_utils.pyx
      Processing scipy/_lib/_ccallback_c.pyx
      Processing scipy/_lib/_test_deprecation_def.pyx
      Processing scipy/_lib/_test_deprecation_call.pyx
      Processing scipy/_lib/messagestream.pyx
      Processing scipy/special/_ufuncs_cxx.pyx
      Processing scipy/special/cython_special.pyx
      Processing scipy/special/_ellip_harm_2.pyx
      Processing scipy/special/_comb.pyx
      Processing scipy/special/_test_round.pyx
      Processing scipy/special/_ufuncs.pyx
      Processing scipy/fftpack/convolve.pyx
      Processing scipy/interpolate/interpnd.pyx
      Processing scipy/interpolate/_bspl.pyx
      Processing scipy/interpolate/_ppoly.pyx
      Processing scipy/sparse/_csparsetools.pyx.in
      Processing scipy/sparse/csgraph/_shortest_path.pyx
      Processing scipy/sparse/csgraph/_traversal.pyx
      Processing scipy/sparse/csgraph/_flow.pyx
      Processing scipy/sparse/csgraph/_tools.pyx
      Processing scipy/sparse/csgraph/_matching.pyx
      Processing scipy/sparse/csgraph/_reordering.pyx
      Processing scipy/sparse/csgraph/_min_spanning_tree.pyx
      Processing scipy/spatial/_qhull.pyx
      Processing scipy/spatial/_ckdtree.pyx
      Processing scipy/spatial/_voronoi.pyx
      Processing scipy/spatial/_hausdorff.pyx
      Processing scipy/spatial/transform/_rotation.pyx
      Processing scipy/signal/_max_len_seq_inner.pyx
      Processing scipy/signal/_peak_finding_utils.pyx
      Processing scipy/signal/_upfirdn_apply.pyx
      Processing scipy/signal/_spectral.pyx
      Processing scipy/signal/_sosfilt.pyx
      Processing scipy/stats/_stats.pyx
      Processing scipy/stats/_qmc_cy.pyx
      Processing scipy/stats/_biasedurn.pyx
      Processing scipy/stats/_sobol.pyx
      Processing scipy/stats/_boost/src/beta_ufunc.pyx
      Processing scipy/stats/_boost/src/nbinom_ufunc.pyx
      Processing scipy/stats/_boost/src/hypergeom_ufunc.pyx
      Processing scipy/stats/_boost/src/binom_ufunc.pyx
      Processing scipy/stats/_unuran/unuran_wrapper.pyx
      warning: unuran_wrapper.pyx:470:21: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:470:28: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:470:36: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:515:21: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:515:28: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:515:36: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:1469:21: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:1469:28: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      warning: unuran_wrapper.pyx:1469:36: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
      Cythonizing sources
      lapack_opt_info:
      lapack_mkl_info:
      customize UnixCCompiler
        libraries mkl_rt not found in ['/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib', '/usr/lib']
        NOT AVAILABLE
      
      openblas_lapack_info:
        libraries openblas not found in ['/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib', '/usr/lib']
        NOT AVAILABLE
      
      openblas_clapack_info:
        libraries openblas,lapack not found in ['/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib', '/usr/lib']
        NOT AVAILABLE
      
      flame_info:
        libraries flame not found in ['/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib', '/usr/lib']
        NOT AVAILABLE
      
      accelerate_info:
        NOT AVAILABLE
      
      atlas_3_10_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries tatlas,tatlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries lapack_atlas not found in /usr/lib
        libraries tatlas,tatlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
        NOT AVAILABLE
      
      atlas_3_10_info:
        libraries lapack_atlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries satlas,satlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries lapack_atlas not found in /usr/lib
        libraries satlas,satlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_3_10_info'>
        NOT AVAILABLE
      
      atlas_threads_info:
      Setting PTATLAS=ATLAS
        libraries lapack_atlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries ptf77blas,ptcblas,atlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries lapack_atlas not found in /usr/lib
        libraries ptf77blas,ptcblas,atlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_threads_info'>
        NOT AVAILABLE
      
      atlas_info:
        libraries lapack_atlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries f77blas,cblas,atlas not found in /Users/runner/miniconda3/envs/build/envs/mdanalysis/lib
        libraries lapack_atlas not found in /usr/lib
        libraries f77blas,cblas,atlas not found in /usr/lib
      <class 'numpy.distutils.system_info.atlas_info'>
        NOT AVAILABLE
      
      lapack_info:
        libraries lapack not found in ['/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib', '/usr/lib']
        NOT AVAILABLE
      
      /private/var/folders/nb/w5j42j713y5gvc3ny3kxlx140000gn/T/pip-build-env-7e4zybdp/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1858: UserWarning:
          Lapack (http://www.netlib.org/lapack/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [lapack]) or by setting
          the LAPACK environment variable.
        return getattr(self, '_calc_info_{}'.format(name))()
      lapack_src_info:
        NOT AVAILABLE
      
      /private/var/folders/nb/w5j42j713y5gvc3ny3kxlx140000gn/T/pip-build-env-7e4zybdp/overlay/lib/python3.10/site-packages/numpy/distutils/system_info.py:1858: UserWarning:
          Lapack (http://www.netlib.org/lapack/) sources not found.
          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [lapack_src]) or by setting
          the LAPACK_SRC environment variable.
        return getattr(self, '_calc_info_{}'.format(name))()
        NOT AVAILABLE
      
      Traceback (most recent call last):
        File "/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/runner/miniconda3/envs/build/envs/mdanalysis/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/private/var/folders/nb/w5j42j713y5gvc3ny3kxlx140000gn/T/pip-build-env-7e4zybdp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/nb/w5j42j713y5gvc3ny3kxlx140000gn/T/pip-build-env-7e4zybdp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/nb/w5j42j713y5gvc3ny3kxlx140000gn/T/pip-build-env-7e4zybdp/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 628, in <module>
          setup_package()
        File "setup.py", line 624, in setup_package
          setup(**metadata)
        File "/private/var/folders/nb/w5j42j713y5gvc3ny3kxlx140000gn/T/pip-build-env-7e4zybdp/overlay/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup
          config = configuration()
        File "setup.py", line 526, in configuration
          raise NotFoundError(msg)
      numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found. Note: Accelerate is no longer supported.
      To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
      See site.cfg.example in the Scipy source directory and
      https://docs.scipy.org/doc/scipy/reference/building/index.html for details.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@tylerjereddy
Copy link
Member Author

It is using a tarball Using cached scipy-1.8.1.tar.gz instead of the binary wheel, you can open an issue on the SciPy issue tracker if you think the problem is real, but I doubt it is a real problem.

Mostly likely you are using an operating system that is too old--see: scipy/scipy#15861 (comment)

The name of the wheel file clearly shows that you need at least Mac OS 12.0, scipy-1.8.1-cp310-cp310-macosx_12_0_arm64.whl. Should be in our release notes fairly clearly here: https://docs.scipy.org/doc/scipy/release.1.7.3.html

@mikemhenry
Copy link

Weird, osx must not let you upgrade to 12.0 from the cli:

lilmac@lilmac ~ % sw_vers
ProductName:	macOS
ProductVersion:	11.6.6
BuildVersion:	20G624
lilmac@lilmac ~ % sudo softwareupdate -l                                                                                                                                   
Password:
Software Update Tool

Finding available software
No new software available.

@mikemhenry
Copy link

Great I can't even turn on VNC remotely:

lilmac@lilmac ~ % sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all
Password:
Starting...
Warning: macos 10.14 and later only allows control if Screen Sharing is enabled through System Preferences.
Activated Remote Management.
Stopped ARD Agent.
lilmac: Set user remote control privileges.
lilmac: Set user remote access.
Done.

@tylerjereddy
Copy link
Member Author

I just built MDAnalysis develop from source and it passed the full test suite locally on a laptop with M2 max. The testsuite also runs exceptionally fast on Apple Silicon in my hands:

  • in source tree: python -m pip install -v .
  • in test tree after installing test package: pytest MDAnalysisTests -n 12
    • 18240 passed, 744 skipped, 7 xfailed, 2 xpassed, 32493 warnings in 103.37s (0:01:43)

Combined with the fact that we have Apple Silicon CI testing actively passing on our PRs, I'd say we're good enough to close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants