Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

TypeError: expected np.ndarray (got numpy.ndarray) #94

Open
xy3xy3 opened this issue Nov 21, 2024 · 0 comments
Open

TypeError: expected np.ndarray (got numpy.ndarray) #94

xy3xy3 opened this issue Nov 21, 2024 · 0 comments

Comments

@xy3xy3
Copy link

xy3xy3 commented Nov 21, 2024

I found that the torch and numpy version is not compatible in my environment.
I fix it after install numpy-1.26.0 rather than 1.26.1.

(base) root@dc1e2891c6de:~/Easy-Wav2Lip# python install.py
File replaced at /root/miniconda/lib/python3.10/site-packages/degradations.py
Traceback (most recent call last):
  File "/root/Easy-Wav2Lip/install.py", line 46, in <module>
    from enhance import load_sr
  File "/root/Easy-Wav2Lip/enhance.py", line 2, in <module>
    from gfpgan import GFPGANer
  File "/root/miniconda/lib/python3.10/site-packages/gfpgan/__init__.py", line 2, in <module>
    from .archs import *
  File "/root/miniconda/lib/python3.10/site-packages/gfpgan/archs/__init__.py", line 2, in <module>
    from basicsr.utils import scandir
  File "/root/miniconda/lib/python3.10/site-packages/basicsr/__init__.py", line 3, in <module>
    from .archs import *
  File "/root/miniconda/lib/python3.10/site-packages/basicsr/archs/__init__.py", line 5, in <module>
    from basicsr.utils import get_root_logger, scandir
  File "/root/miniconda/lib/python3.10/site-packages/basicsr/utils/__init__.py", line 2, in <module>
    from .diffjpeg import DiffJPEG
  File "/root/miniconda/lib/python3.10/site-packages/basicsr/utils/diffjpeg.py", line 19, in <module>
    y_table = nn.Parameter(torch.from_numpy(y_table))
TypeError: expected np.ndarray (got numpy.ndarray)
(base) root@dc1e2891c6de:~/Easy-Wav2Lip# pip list
Package                        Version
------------------------------ ---------------
absl-py                        2.1.0
addict                         2.4.0
anaconda-anon-usage            0.4.4
anyio                          4.4.0
archspec                       0.2.3
argon2-cffi                    23.1.0
argon2-cffi-bindings           21.2.0
arrow                          1.3.0
asttokens                      2.4.1
async-lru                      2.0.4
attrs                          23.2.0
audioread                      3.0.1
Babel                          2.15.0
backcall                       0.2.0
basicsr                        1.4.2
batch-face                     1.4.0
beautifulsoup4                 4.12.3
bleach                         6.1.0
boltons                        23.0.0
Brotli                         1.0.9
certifi                        2024.8.30
cffi                           1.16.0
charset-normalizer             2.0.4
comm                           0.2.2
conda                          24.9.2
conda-content-trust            0.2.0
conda-libmamba-solver          24.1.0
conda-package-handling         2.2.0
conda_package_streaming        0.9.0
contourpy                      1.3.1
cryptography                   42.0.5
cycler                         0.12.1
debugpy                        1.8.2
decorator                      4.4.2
defusedxml                     0.7.1
distro                         1.9.0
dlib                           19.24.2
exceptiongroup                 1.2.1
executing                      2.0.1
facexlib                       0.3.0
fastjsonschema                 2.20.0
filelock                       3.13.1
filterpy                       1.4.5
fonttools                      4.55.0
fqdn                           1.5.1
frozendict                     2.4.6
fsspec                         2024.2.0
future                         1.0.0
gdown                          4.7.1
gfpgan                         1.3.8
grpcio                         1.68.0
h11                            0.14.0
httpcore                       1.0.5
httpx                          0.27.0
idna                           3.7
imageio                        2.36.0
imageio-ffmpeg                 0.4.9
importlib-metadata             6.8.0
ipykernel                      6.29.5
ipython                        8.16.1
isoduration                    20.11.0
jedi                           0.19.1
Jinja2                         3.1.4
joblib                         1.4.2
json5                          0.9.25
jsonpatch                      1.33
jsonpointer                    2.1
jsonschema                     4.22.0
jsonschema-specifications      2023.12.1
jupyter_client                 8.6.2
jupyter_core                   5.7.2
jupyter-events                 0.10.0
jupyter-lsp                    2.2.5
jupyter_server                 2.14.1
jupyter_server_terminals       0.5.3
jupyterlab                     4.2.3
jupyterlab-language-pack-zh-CN 4.2.post1
jupyterlab_pygments            0.3.0
jupyterlab_server              2.27.2
kiwisolver                     1.4.7
lazy_loader                    0.4
libmambapy                     1.5.8
librosa                        0.10.1
llvmlite                       0.43.0
lmdb                           1.5.1
Markdown                       3.7
MarkupSafe                     2.1.5
matplotlib                     3.9.2
matplotlib-inline              0.1.7
menuinst                       2.0.2
mistune                        3.0.2
moviepy                        1.0.3
mpmath                         1.3.0
msgpack                        1.1.0
nbclient                       0.10.0
nbconvert                      7.16.4
nbformat                       5.10.4
nest-asyncio                   1.6.0
networkx                       3.2.1
notebook_shim                  0.2.4
numba                          0.60.0
numpy                          1.26.1
opencv-python                  4.8.1.78
overrides                      7.7.0
packaging                      23.2
pandocfilters                  1.5.1
parso                          0.8.4
pexpect                        4.9.0
pickleshare                    0.7.5
pillow                         10.2.0
pip                            24.0
platformdirs                   3.10.0
pluggy                         1.0.0
pooch                          1.8.2
proglog                        0.1.10
prometheus_client              0.20.0
prompt_toolkit                 3.0.47
protobuf                       5.28.3
psutil                         6.0.0
ptyprocess                     0.7.0
pure-eval                      0.2.2
pycosat                        0.6.6
pycparser                      2.21
Pygments                       2.18.0
pyparsing                      3.2.0
PySocks                        1.7.1
python-dateutil                2.9.0.post0
python-json-logger             2.0.7
PyYAML                         6.0.1
pyzmq                          26.0.3
referencing                    0.35.1
requests                       2.31.0
rfc3339-validator              0.1.4
rfc3986-validator              0.1.1
rpds-py                        0.18.1
ruamel.yaml                    0.17.21
ruamel.yaml.clib               0.2.6
scikit-image                   0.24.0
scikit-learn                   1.5.2
scipy                          1.11.3
Send2Trash                     1.8.3
setuptools                     69.5.1
six                            1.16.0
sniffio                        1.3.1
soundfile                      0.12.1
soupsieve                      2.5
soxr                           0.5.0.post1
stack-data                     0.6.3
sympy                          1.12
tb-nightly                     2.19.0a20241120
tensorboard-data-server        0.7.2
terminado                      0.18.1
threadpoolctl                  3.5.0
tifffile                       2024.9.20
tinycss2                       1.3.0
tomli                          2.0.1
torch                          2.1.0+cu121
torchaudio                     2.1.0+cu121
torchvision                    0.16.0+cu121
tornado                        6.4.1
tqdm                           4.66.2
traitlets                      5.14.3
triton                         2.1.0
truststore                     0.8.0
types-python-dateutil          2.9.0.20240316
typing_extensions              4.12.2
uri-template                   1.3.0
urllib3                        2.1.0
wcwidth                        0.2.13
webcolors                      24.6.0
webencodings                   0.5.1
websocket-client               1.8.0
Werkzeug                       3.1.3
wheel                          0.43.0
yapf                           0.43.0
zipp                           3.21.0
zstandard                      0.23.0
(base) root@dc1e2891c6de:~/Easy-Wav2Lip# ropip install numpy==1.26.0
 -y
bash: ropip: command not found
bash: -y: command not found
(base) root@dc1e2891c6de:~/Easy-Wav2Lip# pip install numpy==1.26.0
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting numpy==1.26.0
  Downloading https://mirrors.aliyun.com/pypi/packages/9b/5a/f265a1ba3641d16b5480a217a6aed08cceef09cd173b568cd5351053472a/numpy-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.2/18.2 MB 13.5 MB/s eta 0:00:00
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.26.1
    Uninstalling numpy-1.26.1:
      Successfully uninstalled numpy-1.26.1
Successfully installed numpy-1.26.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
(base) root@dc1e2891c6de:~/Easy-Wav2Lip# python install.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant