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

FileNotFoundError from subprocess.Popen(cmd) #27

Closed
TigerStone93 opened this issue Aug 22, 2019 · 9 comments
Closed

FileNotFoundError from subprocess.Popen(cmd) #27

TigerStone93 opened this issue Aug 22, 2019 · 9 comments

Comments

@TigerStone93
Copy link

Hello.
When I run python runGan.py 1 to test, I encountered the error below.

Testing test case 1
Traceback (most recent call last):
File "runGan.py", line 90, in
mycall(cmd1).communicate()
File "runGan.py", line 21, in mycall
return subprocess.Popen(cmd)
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Users\user\Anaconda3\envs\tensorflow\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

Please give me any solution or hint to solve this problem.

@LukeZhuohuiLi
Copy link

LukeZhuohuiLi commented Aug 22, 2019

Use python 3.6.7, tensorflow has some problems with python 3.7.

@TigerStone93
Copy link
Author

@LukeZhuohuiLi Thanks for your advice but it did not work under Python 3.6.7 too.

@LukeZhuohuiLi
Copy link

LukeZhuohuiLi commented Aug 26, 2019

@LukeZhuohuiLi Thanks for your advice but it did not work under Python 3.6.7 too.

I got the same problem, I don't remember, but I solved it either switch to python 3.6 or switch python 32bit to 64bit, after that just run pip3 install -r requirements.txt.

@TigerStone93
Copy link
Author

TigerStone93 commented Aug 26, 2019

@LukeZhuohuiLi Could I ask what environment did you used? Was it Anaconda3(64bit)?

@LukeZhuohuiLi
Copy link

LukeZhuohuiLi commented Aug 26, 2019

@LukeZhuohuiLi Could I ask what environment did you used? Was it Anaconda3(64bit)?

I didn't use Anaconda because downgrading to python 3.6 in Anaconda takes a lot of time. Also CUDA 10.1 is not compatible with pytorch.
Check the right version and command from here: https://pytorch.org

Don't use python 3.7 since tensorflow is not compatible with python 3.7.

also, there is one problem that I can't remember, I ended up using python 3.6.7 64bit(I am sure 3.7 and 3.6.0 doesn't work with the code) and add the Scripts folder to the environment variables(path). update the pip directly from CMD, rename the python.exe to python3.exe.
You will probably need wget.exe download from here, unzip and put it inside the Scripts folder.
Then I use
pip3 install --ignore-installed --upgrade tensorflow-gpu
pip3 install -r requirements.txt

python3 runGan.py 1
You will see a lot of warnings, but the program will still run.
wget.zip

@TigerStone93
Copy link
Author

@LukeZhuohuiLi
What a detailed desciption!
Thank you for your help.
I will try and let you know the result.

@TigerStone93
Copy link
Author

@LukeZhuohuiLi It works perfectly on Python 3.5, Ubuntu 16.04.
Thank you so much.
Maybe there is a compatibility problem on Anaconda 3, Windows.

@BingEdison
Copy link

including shell=True in subprocess function solved issue for me on win10 inside runGan.py, example line 21: subprocess.Popen(cmd) --> subprocess.Popen(cmd,shell=True)

@TigerStone93
Copy link
Author

TigerStone93 commented Sep 29, 2019

@EdisonBing Thank you for your kind commentary.

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