chychkan / DeepFaceLab_MacOS

Run DeepFaceLab on MacOS
GNU General Public License v3.0
268 stars 64 forks source link

ModuleNotFoundError: No module named 'numpy' #84

Open oguznamal opened 2 years ago

oguznamal commented 2 years ago

I've read about this numpy issue almost all over the internet. I changed my Python version to 3.9.6 to 3.7.0, 3.7.1 and so on. I tried all of these versions. I removed numpy and python each time by pip3 uninstall numpy, brew doctor and brew cleanup. However, I'm still getting same error when I run the scripts.

What I tried is:

I installed all the necessary modules: git, FFmpeg, Python3, Virtualenv, hdf5

I cloned the repository by the code git clone https://github.com/chychkan/DeepFaceLab_MacOS.git I ran the scripts by sh ./scripts/0_setup.sh Then I ran 2_extract_images_from_video_data_src.sh I got this error.

The error:

Traceback (most recent call last): File "/Users/myusername/DeepFaceLab_MacOS/.dfl/DeepFaceLab/main.py", line 6, in from core.leras import nn File "/Users/myusername/DeepFaceLab_MacOS/.dfl/DeepFaceLab/core/leras/init.py", line 1, in from .nn import nn File "/Users/myusername/DeepFaceLab_MacOS/.dfl/DeepFaceLab/core/leras/nn.py", line 25, in import numpy as np ModuleNotFoundError: No module named 'numpy'

I tried it with various python versions from 3.7 to 3.9.6

When I try to install numpy by pip3 install numpy, I'm getting this:

Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (1.21.5)

I need a help about this problem.

rolandinthedeep commented 2 years ago

I am also having this exact issue.

revolutionarycomrade commented 2 years ago

Also the exact same issue.

rolandinthedeep commented 2 years ago

Bumping this issue.

rolandinthedeep commented 2 years ago

For those running on Apple Silicon Macs, I may have found the solution. You need to download a Mac OS version of Tensorflow.

See the following: https://developer.apple.com/metal/tensorflow-plugin/

However, it appears there is still no option for GPU support with Tensorflow in Mac OS, even though Metal is specified in these installations. Can anyone help?

slebetman commented 2 years ago

I have the same issue. Installing tensorflow did not solve it

Smiril commented 2 years ago

well I need help too running python 3.10 M1 Apple silicon

finius04 commented 2 years ago

I'm having the same issue - installed macos and metal tensorflow - still isn't working.

Vojtanos commented 2 years ago

try to remove all code from nn.py file and paste there this: import sys print(sys.executable) Then you will see path of which python enviroment is used. (I'm almost sure you installed the packages in a environment which is not used)

jeremybarbaud commented 2 years ago

And how it's possible to install the packages on the good environment ?

Smiril commented 2 years ago

And how it's possible to install the packages on the good environment ?

pip install -r file.txt

jeremybarbaud commented 2 years ago

Thanks ! Error with numpy again ` Building wheels for collected packages: numpy WARNING: Building wheel for numpy failed: [Errno 13] Permission denied: '/Users/jbarbaud/Library/Caches/pip/wheels/8c' Failed to build numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects [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.`

That's right on my cache folder I didn't have the folder '/Users/jbarbaud/Library/Caches/pip/wheels/8c'

Many thanks for your help

Smiril commented 2 years ago

Thanks ! Error with numpy again ` Building wheels for collected packages: numpy WARNING: Building wheel for numpy failed: [Errno 13] Permission denied: '/Users/jbarbaud/Library/Caches/pip/wheels/8c' Failed to build numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects [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.`

That's right on my cache folder I didn't have the folder '/Users/jbarbaud/Library/Caches/pip/wheels/8c'

Many thanks for your help

try :

source .dfl/env/bin/activate pip install numpy deactivate source .dfl/env/bin/activate

or

source .dfl/env/bin/activate pip install -r file.txt

and a question are you admin or user?

jeremybarbaud commented 2 years ago

Thanks that's working and I tried with sudo

But now new issue : 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.

But about : metadata-generation-failed on google I found some stckoverflow talked about that but nothing work.

Smiril commented 2 years ago

Thanks that's working and I tried with sudo

But now new issue : 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.

But about : metadata-generation-failed on google I found some stckoverflow talked about that but nothing work.

what did you installed?

there's no useful information about anything

jeremybarbaud commented 2 years ago

Ok I'm going to explain my steps :

  1. Terminal > cd DeepFaceLab_MacOS > source .dfl/env/bin/activate
  2. ./scripts/0_setup.sh
  3. Result : Running on Apple M1 chip Requirement already satisfied: pip in ./.dfl/env/lib/python3.10/site-packages (22.2.2) Using requirements_3.10.txt for Python 3.10.6
  4. scripts/2_extract_images_from_video_data_src.sh
  5. Result : Traceback (most recent call last): File "/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/DeepFaceLab/main.py", line 6, in from core.leras import nn File "/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/DeepFaceLab/core/leras/init.py", line 1, in from .nn import nn File "/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/DeepFaceLab/core/leras/nn.py", line 25, in import numpy as np ModuleNotFoundError: No module named 'numpy'
  6. So : sudo -H pip3 install -r requirements_3.10.txt
  7. Result : Collecting numpy==1.22.2 Using cached numpy-1.22.2-cp310-cp310-macosx_11_0_arm64.whl (12.8 MB) Collecting numexpr==2.8.1 Using cached numexpr-2.8.1.tar.gz (94 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting opencv-python==4.5.5.62 Using cached opencv_python-4.5.5.62-cp37-abi3-macosx_11_0_arm64.whl (27.9 MB) Collecting scipy==1.8.0 Using cached scipy-1.8.0.tar.gz (38.3 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 ╰─> [188 lines of output] setup.py:482: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/tmp/pip-modern-metadata-dosn6zla'), 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/_comb.pyx Processing scipy/special/_ellip_harm_2.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:1476: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:1476: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:1476: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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib'] NOT AVAILABLE

    openblas_lapack_info: libraries openblas not found in ['/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib'] NOT AVAILABLE

    openblas_clapack_info: libraries openblas,lapack not found in ['/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib'] NOT AVAILABLE

    flame_info: libraries flame not found in ['/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib'] NOT AVAILABLE

    accelerate_info: NOT AVAILABLE

    atlas_3_10_threads_info: Setting PTATLAS=ATLAS libraries lapack_atlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries tatlas,tatlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries lapack_atlas not found in /usr/local/lib libraries tatlas,tatlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries satlas,satlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries lapack_atlas not found in /usr/local/lib libraries satlas,satlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries ptf77blas,ptcblas,atlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries lapack_atlas not found in /usr/local/lib libraries ptf77blas,ptcblas,atlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries f77blas,cblas,atlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib libraries lapack_atlas not found in /usr/local/lib libraries f77blas,cblas,atlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib'] NOT AVAILABLE

    /private/tmp/pip-build-env-rrr9384k/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, '_calcinfo{}'.format(name))() lapack_src_info: NOT AVAILABLE

    /private/tmp/pip-build-env-rrr9384k/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, '_calcinfo{}'.format(name))() NOT AVAILABLE

    Traceback (most recent call last): File "/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in main() File "/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/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/tmp/pip-build-env-rrr9384k/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel self.run_setup() File "/private/tmp/pip-build-env-rrr9384k/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "/private/tmp/pip-build-env-rrr9384k/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 626, in setup_package() File "setup.py", line 622, in setup_package setup(metadata) File "/private/tmp/pip-build-env-rrr9384k/overlay/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup config = configuration() File "setup.py", line 522, 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.

Smiril commented 2 years ago

each run cd DeepFaceLab_MacOS source .dfl/env/bin/activate bash scripts/2_extract_images_from_video_data_src.sh and follow up

did you own a M1 or intel Mac?

jeremybarbaud commented 2 years ago

I'm on M1 With bash scripts/2_extract_images_from_video_data_src.sh result : (env) (base) jbarbaud@Air-de-Jeremy DeepFaceLab_MacOS % bash scripts/2_extract_images_from_video_data_src.sh Process Process-1: Traceback (most recent call last): File "/opt/homebrew/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/opt/homebrew/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/DeepFaceLab/core/leras/device.py", line 102, in _get_tf_devices_proc import tensorflow ModuleNotFoundError: No module named 'tensorflow'

So I tried to : (env) (base) jbarbaud@Air-de-Jeremy DeepFaceLab_MacOS % pip install -r requirements_3.10.txt

Result : Collecting numpy==1.22.2 Using cached numpy-1.22.2-cp310-cp310-macosx_11_0_arm64.whl (12.8 MB) Collecting numexpr==2.8.1 Using cached numexpr-2.8.1.tar.gz (94 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting opencv-python==4.5.5.62 Using cached opencv_python-4.5.5.62-cp37-abi3-macosx_11_0_arm64.whl (27.9 MB) Collecting scipy==1.8.0 Using cached scipy-1.8.0.tar.gz (38.3 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 ╰─> [188 lines of output] setup.py:482: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /private/var/folders/df/4fz590ws4nlc26j3mgc28lmm0000gn/T/pip-modern-metadata-sib7433m'), 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:1476: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:1476: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:1476: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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib'] NOT AVAILABLE

  openblas_lapack_info:
    libraries openblas not found in ['/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  openblas_clapack_info:
    libraries openblas,lapack not found in ['/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  flame_info:
    libraries flame not found in ['/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  accelerate_info:
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
    libraries lapack_atlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries tatlas,tatlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries tatlas,tatlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries satlas,satlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries satlas,satlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries ptf77blas,ptcblas,atlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries ptf77blas,ptcblas,atlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries f77blas,cblas,atlas not found in /Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries f77blas,cblas,atlas not found in /usr/local/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  /private/var/folders/df/4fz590ws4nlc26j3mgc28lmm0000gn/T/pip-build-env-m26k2j92/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/df/4fz590ws4nlc26j3mgc28lmm0000gn/T/pip-build-env-m26k2j92/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/Users/jbarbaud/DeepFaceLab_MacOS/.dfl/env/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/jbarbaud/DeepFaceLab_MacOS/.dfl/env/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/df/4fz590ws4nlc26j3mgc28lmm0000gn/T/pip-build-env-m26k2j92/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/df/4fz590ws4nlc26j3mgc28lmm0000gn/T/pip-build-env-m26k2j92/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/private/var/folders/df/4fz590ws4nlc26j3mgc28lmm0000gn/T/pip-build-env-m26k2j92/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 626, in <module>
      setup_package()
    File "setup.py", line 622, in setup_package
      setup(**metadata)
    File "/private/var/folders/df/4fz590ws4nlc26j3mgc28lmm0000gn/T/pip-build-env-m26k2j92/overlay/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup
      config = configuration()
    File "setup.py", line 522, 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.

Smiril commented 2 years ago

try this repository

it work except training

jeremybarbaud commented 2 years ago

Much better many thanks ! But now it's ffmepg error : /!\ ffmpeg fail, job commandline:['ffmpeg', '-i', '/Users/jbarbaud/DeepFaceLab_MacOS/workspace/data_src.mp4', '-pix_fmt', 'rgb24', '/Users/jbarbaud/DeepFaceLab_MacOS/workspace/data_src/%5d.png']

I tried to uninstall ffmpeg and install ffmpeg-python but nothing fix it

Smiril commented 2 years ago

I've got the same error

Smiril commented 2 years ago

deactivate source .dfl/env/bin/activate

2x times fix it for me

(env) Smiril@seti DeepFaceLab_MacOS % bash scripts/2_extract_images_from_video_data_src.sh Metal device set to: Apple M1 Max

systemMemory: 64.00 GB maxCacheSize: 24.00 GB

[0] Enter FPS ( ?:help ) : 0 0 [png] Output image format ( png/jpg ?:help ) : png png ffmpeg version 5.1 Copyright (c) 2000-2022 the FFmpeg developers built with Apple clang version 13.1.6 (clang-1316.0.21.2.5) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Smiril/Documents/deep/DeepFaceLab_MacOS/workspace/data_src.mp4': Metadata: major_brand : qt
minor_version : 0 compatible_brands: qt
creation_time : 2022-07-08T16:38:46.000000Z encoder : Lavf58.29.100 com.apple.photos.originating.signature: AZDxVtQPbhZQU2jXPcFyksKdSiJR com.apple.quicktime.creationdate: 2022-06-02T21:47:56+02:00 Duration: 00:00:18.07, start: 0.000000, bitrate: 191 kb/s Stream #0:00x1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default) Metadata: creation_time : 2022-07-08T16:38:46.000000Z handler_name : Core Media Audio vendor_id : [0][0][0][0] Stream #0:10x2: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 256x256, 116 kb/s, 29.89 fps, 30 tbr, 15360 tbn (default) Metadata: creation_time : 2022-07-08T16:38:46.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : 'avc1' Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> png (native)) Press [q] to stop, [?] for help [swscaler @ 0x110030000] [swscaler @ 0x118008000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x1100a8000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x1100b8000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x118198000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x1181a8000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x128838000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x128848000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x128858000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x128868000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x1100c8000] No accelerated colorspace conversion found from yuv420p to rgb24. [swscaler @ 0x110030000] [swscaler @ 0x1100d8000] No accelerated colorspace conversion found from yuv420p to rgb24. Output #0, image2, to '/Users/Smiril/Documents/deep/DeepFaceLab_MacOS/workspace/data_src/%5d.png': Metadata: major_brand : qt
minor_version : 0 compatible_brands: qt
com.apple.quicktime.creationdate: 2022-06-02T21:47:56+02:00 com.apple.photos.originating.signature: AZDxVtQPbhZQU2jXPcFyksKdSiJR encoder : Lavf59.27.100 Stream #0:0(und): Video: png, rgb24(pc, gbr/unknown/unknown, progressive), 256x256, q=2-31, 200 kb/s, 30 fps, 30 tbn (default) Metadata: creation_time : 2022-07-08T16:38:46.000000Z handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : Lavc59.37.100 png frame= 542 fps=0.0 q=-0.0 Lsize=N/A time=00:00:18.06 bitrate=N/A speed=39.9x
video:65302kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Done.

jeremybarbaud commented 2 years ago

oh ! Same it's working ! GG

DevanTurtle7 commented 1 year ago

It seems that virtualenv uses the latest version of python when creating a new environment (in this case, Python 3.11). The setup file then looks for requirements_3.11.txt or requirements_3.11_arm64.txt, which does not exist.

To fix this, first ensure that you have a version of python that is supported by this repo. The current supported version are 3.6, 3.9, and 3.10 for non-M1 macs, and 3.9 for M1 macs. Ensure your version is correct by using python -V.

Next, locate your python directory using which python. Copy this path for the next step.

Navigate to the scripts folder and open the 0_setup.sh script. Finally, change the line where the virtualenv is created to specify the path of the python version you want to use.

Example Change this line:

virtualenv -p python3 .dfl/env

to:

virtualenv --python="path/to/python" .dfl/env

Hope this helps :)

marshalleq commented 1 year ago

This is happening to me too. I can see it will take some time to work through this thread. Anyone who's done this already care to post the final solution at the bottom? Clearly the code needs some updates to solve this, which hasn't happened yet.

BigSegun commented 1 year ago

I'm having issue training my SAEHD ON DeepFaceLab image