stylegan2-pytorch icon indicating copy to clipboard operation
stylegan2-pytorch copied to clipboard

Windows: pip install doesn't work

Open pocaha opened this issue 3 years ago • 5 comments

Dear lucidrains,

thank you very much for sharing this work with us.

The following is output from the anaconda prompt when I try to install stylegan2:

ERROR: Command errored out with exit status 1:

 command: 'C:\Users\bibi\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bibi\\AppData\\Local\\Temp\\pip-install-ma3x6o5s\\pytorch-fid_20cb67d1201c4ad9ae07a1faa01a3199\\setup.py'"'"'; __file__='"'"'C:\\Users\\bibi\\AppData\\Local\\Temp\\pip-install-ma3x6o5s\\pytorch-fid_20cb67d1201c4ad9ae07a1faa01a3199\\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\bibi\AppData\Local\Temp\pip-pip-egg-info-y5m73gya'
     cwd: C:\Users\bibi\AppData\Local\Temp\pip-install-ma3x6o5s\pytorch-fid_20cb67d1201c4ad9ae07a1faa01a3199\
Complete output (9 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\bibi\AppData\Local\Temp\pip-install-ma3x6o5s\pytorch-fid_20cb67d1201c4ad9ae07a1faa01a3199\setup.py", line 34, in <module>
    packages=setuptools.find_packages(where='src/'),
  File "C:\Users\bibi\anaconda3\lib\site-packages\setuptools\__init__.py", line 64, in find
    convert_path(where),
  File "C:\Users\bibi\anaconda3\lib\distutils\util.py", line 112, in convert_path
    raise ValueError("path '%s' cannot end with '/'" % pathname)
ValueError: path 'src/' cannot end with '/'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

pocaha avatar Dec 01 '20 23:12 pocaha

Edit: just noticed you were the reporter! Thanks for that.

Looks like pytorch-fid just fixed this in their repo Not sure if its available in pip yet.

trufty avatar Dec 03 '20 22:12 trufty

Hi! It is available in pip, but there is another problem. This time it is fire ...

ERROR: Requested decorator from https://files.pythonhosted.org/packages/ed/69/24345e0d49c700557f135d01f5de03345368303fdee81b54eae28bf6143d/decorator-4.0.8-py2.py3-none-any.whl#sha256=267b0d56f2c44857f0803cefe5ee1b5d661fd17ef78be3b447d295f70d4a9a5d (from ipython<6.0->fire->stylegan2_pytorch) has different version in metadata: '4.0.7'

pocaha avatar Dec 03 '20 22:12 pocaha

I'm getting the same thing, but that looks like a deep rabbit hole. I just ended up downloading this repo and training via python ./stylegan2_pytorch/cli.py <+ params>

You'll have to alter a few import paths, install setup.py packages, and add if __name__ == "__main__": to cli.py:175 to get it running.

Good luck

trufty avatar Dec 04 '20 01:12 trufty

As a temporary workaround, this was sufficient for me:

python -m pip install git+https://github.com/mseitzer/pytorch-fid.git@732341f2129bc8b41cbbfaa4d738788645cb1df7

canadaduane avatar Dec 08 '20 02:12 canadaduane

See: https://github.com/lucidrains/stylegan2-pytorch/issues/155

sharpe5 avatar Dec 09 '20 13:12 sharpe5