Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

No module named 'numpy' when accessing leras/__init__.py. python -mpip install numpy is not working. #5509

@rolandinthedeep

Description

@rolandinthedeep

Expected behavior

I am running my extract script for the MacOS version of DeepFaceLab. The script (2_extract_images_from_video_data_src.sh) is simply:

#!/usr/bin/env bash
cd "$(dirname $0)/.."
source scripts/env.sh

python "$DFL_MAIN" videoed extract-video \
  --input-file "$WORKSPACE/data_src.*" \
  --output-dir "$WORKSPACE/data_src"

Actual behavior

The error is as follows:

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'

Steps to reproduce

I have tried all of the suggestions listed in numpy/numpy#15424.

Using python -mpip install numpy yields:

Requirement already satisfied: numpy in /Users/myusername/opt/anaconda3/envs/deepfake_env/lib/python3.6/site-packages (1.16.4)

I also receive the same message when I do pip3 install numpy.

I attempted to uninstall/reinstall. It throws an error. The only thing that changed is that when I attempt to python -mpip install numpy, I get:

Requirement already satisfied: numpy in /Users/myusername/opt/anaconda3/envs/deepfake_env/lib/python3.6/site-packages (1.19.5)

Additionally, uninstalling my Python IDE (as suggested in numpy/numpy#15424) also did not work.

If it helps, if I do which python once I activate my environment, I get:

/Users/myusername/opt/anaconda3/envs/deepfake_env/bin/python

Other relevant information

  • Operating system and version: macOS
  • Python version: 3.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions