tensorflow / cloud

The TensorFlow Cloud repository provides APIs that will allow to easily go from debugging and training your Keras and TensorFlow code in a local environment to distributed training in the cloud.
https://github.com/tensorflow/cloud
Apache License 2.0
370 stars 84 forks source link

Step 2 of install procedure fails #392

Open SanJoseCosta opened 1 year ago

SanJoseCosta commented 1 year ago

Collecting tensorflow-metadata Downloading tensorflow_metadata-1.2.0-py3-none-any.whl (48 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.5/48.5 kB 8.5 MB/s eta 0:00:00 Collecting pyarrow<3,>=1 Downloading pyarrow-2.0.0.tar.gz (58.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.9/58.9 MB 18.8 MB/s eta 0:00:00 Installing build dependencies ... error error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [3726 lines of output] Ignoring numpy: markers 'python_version < "3.7"' don't match your environment Collecting cython>=0.29 Downloading Cython-0.29.32-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (2.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 41.9 MB/s eta 0:00:00 Collecting numpy==1.16.0 Downloading numpy-1.16.0.zip (5.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 9.3 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting setuptools Using cached setuptools-65.4.1-py3-none-any.whl (1.2 MB) Collecting setuptools_scm Downloading setuptools_scm-7.0.5-py3-none-any.whl (42 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.9/42.9 kB 331.7 kB/s eta 0:00:00 Collecting wheel Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB) Collecting typing-extensions Using cached Collecting tomli>=1.0.0 Downloading tomli-2.0.1-py3-none-any.whl (12 kB) Collecting packaging>=20.0 Using cached packaging-21.3-py3-none-any.whl (40 kB) Collecting pyparsing!=3.0.5,>=2.0.2 Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 14.0 MB/s eta 0:00:00 Building wheels for collected packages: numpy Building wheel for numpy (setup.py): started Building wheel for numpy (setup.py): still running... Building wheel for numpy (setup.py): still running... Building wheel for numpy (setup.py): finished with status 'error' error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [3132 lines of output]
        Running from numpy source directory.
        /tmp/pip-install-3kh2v92_/numpy_5ddd447956ae483f9857a80e0502d6a2/numpy/distutils/misc_util.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?
          return is_string(s) and ('*' in s or '?' is s)
        blas_opt_info:
        blas_mkl_info:
        customize UnixCCompiler
          libraries mkl_rt not found in ['/home/ec2-user/tensorflow_cloud/tfcloud/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
          NOT AVAILABLE

        blis_info:
        customize UnixCCompiler
          libraries blis not found in ['/home/ec2-user/tensorflow_cloud/tfcloud/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
          NOT AVAILABLE

        openblas_info:
        customize UnixCCompiler
        customize UnixCCompiler
          libraries openblas not found in ['/home/ec2-user/tensorflow_cloud/tfcloud/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
          NOT AVAILABLE

        atlas_3_10_blas_threads_info:
        Setting PTATLAS=ATLAS
        customize UnixCCompiler
          libraries tatlas not found in ['/home/ec2-user/tensorflow_cloud/tfcloud/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib', '/usr/lib/sse2', '/usr/lib/']
          NOT AVAILABLE

        atlas_3_10_blas_info:
        customize UnixCCompiler
          libraries satlas not found in ['/home/ec2-user/tensorflow_cloud/tfcloud/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib', '/usr/lib/sse2', '/usr/lib/']
          NOT AVAILABLE

        atlas_blas_threads_info:
        Setting PTATLAS=ATLAS
        customize UnixCCompiler
          libraries ptf77blas,ptcblas,atlas not found in ['/home/ec2-user/tensorflow_cloud/tfcloud/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib', '/usr/lib/sse2', '/usr/lib/']
          NOT AVAILABLE

        atlas_blas_info:
        customize UnixCCompiler
          libraries f77blas,cblas,atlas not found in ['/home/ec2-user/tensorflow_cloud/tfcloud/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib', '/usr/lib/sse2', '/usr/lib/']
          NOT AVAILABLE

        accelerate_info:
          NOT AVAILABLE

        /tmp/pip-install-3kh2v92_/numpy_5ddd447956ae483f9857a80e0502d6a2/numpy/distutils/system_info.py:625: UserWarning:
            Atlas (http://math-atlas.sourceforge.net/) libraries not found.
            Directories to search for the libraries can be specified in the

...

                                 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                 ^
        In file included from /usr/local/include/python3.9/unicodeobject.h:1026:0,
                         from /usr/local/include/python3.9/Python.h:93,
                         from numpy/random/mtrand/mtrand.c:4:
        /usr/local/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
         static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
        numpy/random/mtrand/mtrand.c:42689:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
                                 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                 ^
        In file included from /usr/local/include/python3.9/unicodeobject.h:1026:0,
                         from /usr/local/include/python3.9/Python.h:93,
                         from numpy/random/mtrand/mtrand.c:4:
        /usr/local/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
         Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
                                                     ^~~~~~~~~~~~~~~~~~~
        numpy/random/mtrand/mtrand.c:42689:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
                                 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                 ^
        In file included from /usr/local/include/python3.9/unicodeobject.h:1026:0,
                         from /usr/local/include/python3.9/Python.h:93,
                         from numpy/random/mtrand/mtrand.c:4:
        /usr/local/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
         static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
        error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/home/ec2-user/tensorflow_cloud/tfcloud/include -I/usr/local/include/python3.9 -Ibuild/src.linux-x86_64-3.9/numpy/core/src/common -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.9/numpy/core/src/common -Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -c numpy/random/mtrand/mtrand.c -o build/temp.linux-x86_64-cpython-39/numpy/random/mtrand/mtrand.o -MMD -MF build/temp.linux-x86_64-cpython-39/numpy/random/mtrand/mtrand.o.d" failed with exit status 1
        [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.
  ╰─> numpy

  note: This is an issue with the package mentioned above, not pip.
  hint: See above for output from the failure.
  [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.

anneadb commented 1 year ago

I'm having the same problem - any ideas for a solution yet?

SimardeepSingh-zsh commented 6 months ago

Hi @SanJoseCosta and @anneadb,

The issue you're encountering during the installation process seems to be related to the installation of the 'numpy' package, which TensorFlow relies on. The error log indicates difficulties in building the 'numpy' wheel due to missing dependencies.

Here are a few troubleshooting steps you might try to resolve this:

Ensure Dependencies: Confirm that all necessary dependencies for building 'numpy' are installed on your system. This may include development tools, headers, and libraries that 'numpy' requires.

Virtual Environment: Consider creating a virtual environment and installing TensorFlow within that environment. Sometimes, conflicting package versions or system configurations can cause installation issues.

Check Python Version: Ensure you're using a Python version supported by TensorFlow and compatible with the 'numpy' version you're trying to install.

System Updates: Run system updates and ensure your system packages are up-to-date. Sometimes, outdated system packages can lead to installation problems.

Alternative Installation: Try installing TensorFlow using a different installation method or source (e.g., from pre-built binaries if you're building from source or vice versa).

If the issue persists, it might be beneficial to provide more details about your environment, such as your operating system, Python version, and any specific configurations you've set up. This additional information could help the community identify potential solutions more accurately.

Feel free to share more details here, and we'll do our best to assist you further.

Best regards, Simardeep Singh