Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation #27

Open
Hyrtsi opened this issue Jun 21, 2022 · 5 comments
Open

Installation #27

Hyrtsi opened this issue Jun 21, 2022 · 5 comments

Comments

@Hyrtsi
Copy link

Hyrtsi commented Jun 21, 2022

Greetings and thanks for this amazing repository. I'd suggest the following changes to requirements as I got these errors

Create venv:

python 3.7 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip

Install:

sudo python3 setup.py install

Error messages:

Processing dependencies for ptgaze==0.2.7
error: numpy 1.17.4 is installed but numpy<1.23,>=1.18 is required by {'numba'}

After fixing that I got

error: numpy 1.18.0 is installed but numpy>=1.19.2 is required by {'tifffile'}

and then

error: Pillow 7.0.0 is installed but pillow>=8.3.2 is required by {'imageio'}

and

error: Pillow 8.3.2 is installed but pillow!=8.3.*,>=5.3.0 is required by {'torchvision'}

I fixed the errors like this: I changed requirements.txt to this:

dlib
face_alignment
mediapipe
numpy==1.19.2
omegaconf
opencv-python
pyyaml
scipy
timm
torch
torchvision
Pillow==8.4

I will create a PR to suggest these changes to the repo. I'm posting this merely to help people around this issue.

@Hyrtsi
Copy link
Author

Hyrtsi commented Jun 21, 2022

Actually, the setup.py didn't work at all for me. When I tried to run ptgaze/main.py I got the following error

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'

I fixed it by doing this:

pip install -r requirements.txt

which I thought setup.py would have done for me.

@Hyrtsi
Copy link
Author

Hyrtsi commented Jun 21, 2022

Another error:

$ python3 ptgaze/main.py 
Traceback (most recent call last):
  File "ptgaze/main.py", line 9, in <module>
    from .demo import Demo
ImportError: attempted relative import with no known parent package

@hysts
Copy link
Owner

hysts commented Jun 21, 2022

Hi, @Hyrtsi

When using python:3.9.13-slim docker image, you can install ptgaze without problems with the following steps:

apt update
apt install -y git build-essential cmake
git clone https://github.com/hysts/pytorch_mpiigaze_demo
cd pytorch_mpiigaze_demo
python setup.py install

I guess something is wrong with your installation steps. I'm not sure, but sudo in

sudo python3 setup.py install

may be the cause.

@hysts
Copy link
Owner

hysts commented Jun 21, 2022

Oh, forget what I said earlier. It seems the installation was actually failed. I'll look into it, but it may take some time.

@Hyrtsi
Copy link
Author

Hyrtsi commented Mar 27, 2023

@hysts Thanks for the help. I have heard using sudo in setup.py is an antipattern so it should work without.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants