alievk / avatarify-python

Avatars for Zoom, Skype and other video-conferencing apps.
Other
16.29k stars 4.08k forks source link

ModuleNotFoundError: No module named 'Cython' #159

Closed WesolyKomuch closed 3 years ago

WesolyKomuch commented 4 years ago

I've no idea what's goin' on. Can sb help?

I think I've checked every tutorial about avatarify and I still don't know how to even start with this thing. I'd done everything as in videos

ERROR: Command errored out with exit status 1: command: 'D:\df\conda\envs\avatarify\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\setup.py'"'"'; file='"'"'C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\pip-egg-info' cwd: C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\ Complete output (46 lines): Partial import of skimage during the build process. Traceback (most recent call last): File "C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\skimage_build.py", line 30, in cython from Cython import version ModuleNotFoundError: No module named 'Cython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\setup.py", line 111, in <module>
    setup(
  File "D:\df\conda\envs\avatarify\lib\site-packages\numpy\distutils\core.py", line 137, in setup
    config = configuration()
  File "C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\setup.py", line 70, in configuration
    config.add_subpackage('skimage')
  File "D:\df\conda\envs\avatarify\lib\site-packages\numpy\distutils\misc_util.py", line 1033, in add_subpackage
    config_list = self.get_subpackage(subpackage_name, subpackage_path,
  File "D:\df\conda\envs\avatarify\lib\site-packages\numpy\distutils\misc_util.py", line 999, in get_subpackage
    config = self._get_configuration_from_setup_py(
  File "D:\df\conda\envs\avatarify\lib\site-packages\numpy\distutils\misc_util.py", line 941, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "skimage\setup.py", line 14, in configuration
    config.add_subpackage('feature')
  File "D:\df\conda\envs\avatarify\lib\site-packages\numpy\distutils\misc_util.py", line 1033, in add_subpackage
    config_list = self.get_subpackage(subpackage_name, subpackage_path,
  File "D:\df\conda\envs\avatarify\lib\site-packages\numpy\distutils\misc_util.py", line 999, in get_subpackage
    config = self._get_configuration_from_setup_py(
  File "D:\df\conda\envs\avatarify\lib\site-packages\numpy\distutils\misc_util.py", line 941, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "skimage\feature\setup.py", line 22, in configuration
    cython(['_haar.pyx'], working_path=base_path)
  File "C:\Users\Wesoly Komuch\AppData\Local\Temp\pip-install-n_i02k2x\scikit-image\skimage\_build.py", line 41, in cython
    raise RuntimeError('Cython >= %s is required to build scikit-image from git checkout' \
RuntimeError: Cython >= 0.23 is required to build scikit-image from git checkout
Cython >= 0.23 not found; falling back to pre-built geometry.c
Cython >= 0.23 not found; falling back to pre-built transform.c
Cython >= 0.23 not found; falling back to pre-built interpolation.c
Cython >= 0.23 not found; falling back to pre-built _draw.c
Cython >= 0.23 not found; falling back to pre-built corner_cy.c
Cython >= 0.23 not found; falling back to pre-built censure_cy.c
Cython >= 0.23 not found; falling back to pre-built orb_cy.c
Cython >= 0.23 not found; falling back to pre-built brief_cy.c
Cython >= 0.23 not found; falling back to pre-built _texture.c
Cython >= 0.23 not found; falling back to pre-built _hessian_det_appx.c
Cython >= 0.23 not found; falling back to pre-built _hoghistogram.c
Mr-MooMoo commented 4 years ago

Same here.. [Win10, fresh install of miniconda3]

BlueSpacePotato commented 3 years ago

Editing the scripts/install.sh worked for me. After the conda activate $CONDA_ENV_NAME I insert conda install -c anaconda cython.

#!/usr/bin/env bash

# check prerequisites
command -v conda >/dev/null 2>&1 || { echo >&2 "conda not found. Please refer to the README and install Miniconda."; exit 1; }
command -v git >/dev/null 2>&1 || { echo >&2 "git not found. Please refer to the README and install Git."; exit 1; }

source scripts/settings.sh

# v4l2loopback
if [[ ! $@ =~ "no-vcam" ]]; then
    rm -rf v4l2loopback 2> /dev/null
    git clone https://github.com/alievk/v4l2loopback.git
    echo "--- Installing v4l2loopback (sudo privelege required)"
    cd v4l2loopback
    make && sudo make install
    sudo depmod -a
    cd ..
fi

source $(conda info --base)/etc/profile.d/conda.sh
conda create -y -n $CONDA_ENV_NAME python=3.7
conda activate $CONDA_ENV_NAME

conda install -c anaconda cython

conda install -y -c conda-forge numpy==1.15.0
conda install -y pytorch==1.0.0 torchvision==0.2.1 cuda100 -c pytorch
conda install -y python-blosc==1.7.0 -c conda-forge

# FOMM
rm -rf fomm 2> /dev/null
git clone https://github.com/alievk/first-order-model.git fomm

pip install -r requirements.txt
JohanAR commented 3 years ago

Anyone still having this issue?