deepfakes / faceswap

Deepfakes Software For All
https://www.faceswap.dev
GNU General Public License v3.0
51.46k stars 13.14k forks source link

Windows installer failed to locate Git directory #641

Closed shihong5858 closed 5 years ago

shihong5858 commented 5 years ago

Describe the bug When running the Windows installer, it tries to clone the git repo and failed with this message:

(check) MiniConda installed: conda 4.5.12
(check) CPU Supports AVX Instructions
(check) CPU Supports SSE4 Instructions
(check) Completed check for installed applications

All Prerequisites installed.
Downloading Faceswap...
Execute: "C:\Program Files\git\bin\git.exe" clone --depth 1 --no-single-branch https://github.com/deepfakes/faceswap.git "D:\faceswap"
Error Downloading Faceswap
Install Aborted

However,

  1. the git program is not installed on the path above, it is installed on a different drive.
  2. When running "d:\Program Files\git\bin\git.exe" in PowerShell, it only echo the same path string, not calling the actual executable. One possible way to quote the path is d:\"Program Files"\git\bin\git.exe

To Reproduce Steps to reproduce the behavior:

  1. Install the Git only on D drive.
  2. Run the installer. It would find the git is installed but would try to run git under C drive regardless.
torzdf commented 5 years ago

The execution command for git in the installer source is: "$\"$PROGRAMFILES64\git\bin\git.exe$\" Assuming your windows path for program files is correct, this should point to your d:\ drive: https://nsis.sourceforge.io/Reference/$PROGRAMFILES

I have changed the installer just to run git clone ... if a previous installation is detected, otherwise to execute as it previously did. Hopefully this will fix this potential issue. Uploaded to v0.95b in releases

shihong5858 commented 5 years ago

Confirmed the fix is working now. Thanks for the quick update.

However, when running the installer again, after git clone successfully ran, I got the following error:

(check) Git installed: git version 2.13.0.windows.1
(check) MiniConda installed: conda 4.5.12
(check) CPU Supports AVX Instructions
(check) CPU Supports SSE4 Instructions
(check) Completed check for installed applications

All Prerequisites installed.
Downloading Faceswap...
Execute: git clone --depth 1 --no-single-branch https://github.com/deepfakes/faceswap.git "d:\faceswap"
Creating Conda Virtual Environment...
Execute: "C:\Users\Dante\Miniconda3\scripts\activate.bat" && conda env remove -y -n "faceswap" && conda deactivate
Execute: "C:\Users\Dante\Miniconda3\scripts\activate.bat" && conda create -y python=3.6 -n  "faceswap" && conda deactivate
Installing Dlib...
Renaming dlib-19.16.99-cp36-cp36m-win_amd64_cuda90_avx.whl to dlib-19.16.99-cp36-cp36m-win_amd64.whl
Execute: "C:\Users\Dante\Miniconda3\scripts\activate.bat" && conda activate "faceswap" && pip install C:\Users\Dante\AppData\Local\Temp\nsxC770.tmp\faceswap\temp\dlib-19.16.99-cp36-cp36m-win_amd64.whl &&  conda deactivate
Error Installing Dlib
Install Aborted

I'm not so sure what is causing this, but when I tried to run the installer again, I got a pop-up message box saying "Destination directory exists". I assume I have to remove the directory to keep going?

shihong5858 commented 5 years ago

By the way, when I manually run the command, I got this message:

C:\Users\Dante>"C:\Users\Dante\Miniconda3\scripts\activate.bat" && conda activate "faceswap" && pip install C:\Users\Dante\AppData\Local\Temp\nsxC770.tmp\faceswap\temp\dlib-19.16.99-cp36-cp36m-win_amd64.whl &&  conda deactivate
Requirement 'C:\\Users\\Dante\\AppData\\Local\\Temp\\nsxC770.tmp\\faceswap\\temp\\dlib-19.16.99-cp36-cp36m-win_amd64.whl' looks like a filename, but the file does not exist
Processing c:\users\dante\appdata\local\temp\nsxc770.tmp\faceswap\temp\dlib-19.16.99-cp36-cp36m-win_amd64.whl
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\Dante\\AppData\\Local\\Temp\\nsxC770.tmp\\faceswap\\temp\\dlib-19.16.99-cp36-cp36m-win_amd64.whl

I could only assume the temp folder was placed in a wrong directory during the installation.

torzdf commented 5 years ago

The temp folder only exists for the duration of the install, so it would no longer exist when you run that command. I'm not sure why that command would fail initially though, I haven't seen that happen before. I would guess that it was an issue with pip rather than an issue with the location though, as the previous rename command ran ok.

You can get the dlib file by opening the installer with 7zip, renaming the correct one (as per the log... it has to be named correctly) and then doing pip install yourself.

Yes, you would need to delete the folder. This is a safety precaution to stop people scrubbing old data.