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

another problem in installing in windows ( for a newbie) #14

Closed
MorningAISeeker opened this issue Feb 14, 2020 · 5 comments
Closed

another problem in installing in windows ( for a newbie) #14

MorningAISeeker opened this issue Feb 14, 2020 · 5 comments

Comments

@MorningAISeeker
Copy link

MorningAISeeker commented Feb 14, 2020

Hi
I use conda environment in windows.
According to the readme file, after installing torch and torchvision, i used the command
conda install stylegan2_pytorch but it didn't work. because "stylegan2_pytorch" is not in conda reops. I used pip install stylegan2_pytorch instead. and it worked.
After that, I use stylegan2_pytorch --data /path/to/images command. But error " 'stylegan2_pytorch' is not recognized as an internal or external command operable program or batch file."
Then i cloned the whole repo and moved to that folder. I ran the same command and the same error appeared.
Then i examined python stylegan2_pytorch --data /path/to/images error
"C:\Users\ASUS\Miniconda3\envs\SimpleStyleGan\python.exe: can't find 'main' module in 'stylegan2_pytorch'" appeared.
Then i moved exactly to where two init a and main python files are stored and then run the same command. another error:
"can't open file 'stylegan2_pytorch': [Errno 2] No such file or directory"
finally i used this command:
python -m stylegan2_pytorch --data /path/to/images and no error appeared. But nothing happens and command finishes without any progress or etc!
Sorry for long writing and bad language. The progress in readme seems very straightforward but for me is not. I need more help to run this.
Thanks.

@lucidrains
Copy link
Owner

Oh you are right, I haven't uploaded it to conda at all. Let me update the README.

Could you try, for your second step ./bin/stylegan2_pytorch --data /path/to/images. You are actually pointing at the folder, and not the script that uses the library

@rhoen
Copy link

rhoen commented Feb 14, 2020

Hi @MorningAISeeker, I'm not exactly familiar with how the -m flag should behave in this case. I was also having trouble getting the script to run properly on my windows machine. I eventually managed to run the stylegan2_pytorch command by locating the main module on my machine and running it directly with python, for example python C:\Users\rhoen\Anaconda\Scripts\stylegan2_pytorch --data /path/to/images

Oh and looks like @lucidrains also just noticed this, but my advice in a different windows thread was incorrect, I checked my logs and I did in fact install with pip, not with conda.

@rhoen
Copy link

rhoen commented Feb 14, 2020

Sorry for the confusion @lucidrains

@lucidrains
Copy link
Owner

@rhoen no probs! :) i'm flying blind here without a windows machine, so this is great help

@lucidrains
Copy link
Owner

maybe what i need to do is to upload this to conda, and it'll take care of the script PATH

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

3 participants