"command not found"

Installing and setting up FaceSwap


Forum rules

Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

"command not found"

Post by UndercoverReptilian »

My installation seems to state that it worked, but I get a "command not found" if I try any of the suggested command {extract,train,convert,gui}. I am currently operating on a Macbook Pro with Intel UHD Graphics 630 1536 MB and Catalina.
Did anyone experience a similar problem?
I have a screenshot of the whole log if that's any help.

User avatar
torzdf
Posts: 2670
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: "command not found"

Post by torzdf »

How did you install Faceswap?

My word is final

User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

Re: "command not found"

Post by UndercoverReptilian »

I followed the general instructions here:
https://github.com/deepfakes/faceswap/b ... tall-guide
python setup.py

Using an environment in Anaconda

User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

Re: "command not found"

Post by UndercoverReptilian »

Here's a screenshot of my Terminal:

User avatar
torzdf
Posts: 2670
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: "command not found"

Post by torzdf »

can you please:

  • Screen grab the cli with the output of the ls command
  • post the output of python -V (capital V)
  • Post the output of pip freeze
  • Post the output of conda list

My word is final

User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

Re: "command not found"

Post by UndercoverReptilian »

Code: Select all

Last login: Mon Apr 20 05:20:49 on ttys000
. /Users/**********/Documents/anaconda3/bin/activate && conda activate /Users/**********/Documents/anaconda3/envs/deepfake; 
(base) **********-MBP ~ % . /Users/**********/Documents/anaconda3/bin/activate && conda activate /Users/**********/Documents/anaconda3/envs/deepfake; 
(deepfake) **********-MBP ~ % ls
Applications	Downloads	Library		Pictures	faceswap
Desktop		Dropbox		Movies		Public
Documents	Google Drive	Music		blenderkit_data
(deepfake) ********** ~ %  python -V
Python 3.7.7
(deepfake) ********** ~ % pip freeze
absl-py==0.9.0
astor==0.8.0
certifi==2020.4.5.1
cffi==1.14.0
cloudpickle==1.3.0
cycler==0.10.0
cytoolz==0.10.1
dask==2.14.0
decorator==4.4.2
enum34==1.1.10
fastcluster==1.1.26
ffmpy==0.2.2
gast==0.2.2
google-pasta==0.2.0
grpcio==1.16.1
h5py==2.9.0
imageio==2.6.1
imageio-ffmpeg==0.4.1
joblib==0.14.1
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.1.0
Markdown==3.1.1
matplotlib==3.1.3
mkl-fft==1.0.15
mkl-random==1.1.0
mkl-service==2.3.0
networkx==2.4
numpy==1.17.4
nvidia-ml-py3==7.352.1
olefile==0.46
opencv-python==4.1.2.30
opt-einsum==3.1.0
pathlib==1.0.1
Pillow==6.2.1
plaidml==0.6.4
plaidml-keras==0.6.4
protobuf==3.11.4
psutil==5.7.0
pycparser==2.20
pynvx==1.0.0
pyparsing==2.4.6
python-dateutil==2.8.1
pytz==2019.3
PyWavelets==1.1.1
PyYAML==5.3.1
scikit-image==0.16.2
scikit-learn==0.22.1
scipy==1.4.1
six==1.14.0
tensorboard==1.15.0
tensorflow==1.15.0
tensorflow-estimator==1.15.1
termcolor==1.1.0
toolz==0.10.0
toposort==1.5
tornado==6.0.4
tqdm==4.44.1
webencodings==0.5.1
Werkzeug==0.16.1
wrapt==1.12.1
(deepfake) **********-MBP ~ % conda list
# packages in environment at /Users/**********/Documents/anaconda3/envs/deepfake:
#
# Name                    Version                   Build  Channel
_tflow_select             2.3.0                       mkl  
absl-py 0.9.0 py37_0
astor 0.8.0 py37_0
blas 1.0 mkl
bzip2 1.0.8 h0b31af3_2 conda-forge c-ares 1.15.0 h1de35cc_1001
ca-certificates 2020.1.1 0
certifi 2020.4.5.1 py37_0
cffi 1.14.0 pypi_0 pypi cloudpickle 1.3.0 py_0
cycler 0.10.0 py37_0
cytoolz 0.10.1 py37h1de35cc_0
dask-core 2.14.0 py_0
decorator 4.4.2 py_0
enum34 1.1.10 pypi_0 pypi fastcluster 1.1.26 py37h4f17bb1_0 conda-forge ffmpeg 4.2 h5c2b479_0 conda-forge ffmpy 0.2.2 pypi_0 pypi freetype 2.9.1 hb4e5f40_0
gast 0.2.2 py37_0
gettext 0.19.8.1 h46ab8bc_1002 conda-forge gmp 6.2.0 h4a8c4bd_2 conda-forge gnutls 3.6.5 h53004b3_1002 conda-forge google-pasta 0.2.0 py_0
grpcio 1.16.1 py37h044775b_1
h5py 2.9.0 py37h3134771_0
hdf5 1.10.4 hfa1e0ec_0
imageio 2.6.1 py37_0
imageio-ffmpeg 0.4.1 py_0 conda-forge intel-openmp 2019.4 233
joblib 0.14.1 py_0
jpeg 9b he5867d9_2
keras 2.2.4 0
keras-applications 1.0.8 py_0
keras-base 2.2.4 py37_0
keras-preprocessing 1.1.0 py_1
kiwisolver 1.1.0 py37h0a44026_0
lame 3.100 h1de35cc_1001 conda-forge libcxx 9.0.1 1 conda-forge libcxxabi 4.0.1 hcfea43d_1
libedit 3.1.20181209 hb402a30_0
libffi 3.2.1 h475c297_4
libgfortran 3.0.1 h93005f0_2
libiconv 1.15 h0b31af3_1006 conda-forge libpng 1.6.37 ha441bb4_0
libprotobuf 3.11.4 hd9629dc_0
libtiff 4.1.0 hcb84e12_0
llvm-openmp 4.0.1 hcfea43d_1
markdown 3.1.1 py37_0
matplotlib 3.1.1 py37h54f8f79_0
matplotlib-base 3.1.3 py37h9aa3819_0
mkl 2019.4 233
mkl-service 2.3.0 py37hfbe908c_0
mkl_fft 1.0.15 py37h5e564d8_0
mkl_random 1.1.0 py37ha771720_0
ncurses 6.2 h0a44026_0
nettle 3.4.1 h3efe00b_1002 conda-forge networkx 2.4 py_0
numpy 1.17.4 py37h890c691_0
numpy-base 1.17.4 py37h6575580_0
nvidia-ml-py3 7.352.1 pypi_0 pypi olefile 0.46 py37_0
opencv-python 4.1.2.30 pypi_0 pypi openh264 1.8.0 hd9629dc_1000 conda-forge openssl 1.1.1f h1de35cc_0
opt_einsum 3.1.0 py_0
pathlib 1.0.1 py37_1
pillow 6.2.1 py37hb68e598_0
pip 20.0.2 py37_1
plaidml 0.6.4 pypi_0 pypi plaidml-keras 0.6.4 pypi_0 pypi protobuf 3.11.4 py37h0a44026_0
psutil 5.7.0 py37h1de35cc_0
pycparser 2.20 pypi_0 pypi pynvx 1.0.0 pypi_0 pypi pyparsing 2.4.6 py_0
python 3.7.7 hc70fcce_0_cpython
python-dateutil 2.8.1 py_0
python_abi 3.7 1_cp37m conda-forge pytz 2019.3 py_0
pywavelets 1.1.1 py37h1de35cc_0
pyyaml 5.3.1 py37h1de35cc_0
readline 8.0 h1de35cc_0
scikit-image 0.16.2 py37h6c726b0_0
scikit-learn 0.22.1 py37h27c97d8_0
scipy 1.4.1 py37h9fa6033_0
setuptools 46.1.3 py37_0
six 1.14.0 py37_0
sqlite 3.31.1 ha441bb4_0
tensorboard 1.15.0 pyhb230dea_0
tensorflow 1.15.0 mkl_py37hb249377_0
tensorflow-base 1.15.0 mkl_py37h032239d_0
tensorflow-estimator 1.15.1 pyh2649769_0
termcolor 1.1.0 py37_1
tk 8.6.8 ha441bb4_0
toolz 0.10.0 py_0
toposort 1.5 py_3 conda-forge tornado 6.0.4 py37h1de35cc_1
tqdm 4.44.1 py_0
webencodings 0.5.1 py37_1
werkzeug 0.16.1 py_0
wheel 0.34.2 py37_0
wrapt 1.12.1 py37h1de35cc_1
x264 1!152.20180806 h1de35cc_0 conda-forge xz 5.2.5 h1de35cc_0
yaml 0.1.7 hc338f04_2
zlib 1.2.11 h1de35cc_3
zstd 1.3.7 h5bba6e5_0
User avatar
torzdf
Posts: 2670
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: "command not found"

Post by torzdf »

Code: Select all

cd faceswap
python faceswap.py ...

My word is final

User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

Re: "command not found"

Post by UndercoverReptilian »

I tried copying your command and I still get the same "command not found"

Attachments
Screen Shot 2020-04-20 at 8.48.07 PM.png
Screen Shot 2020-04-20 at 8.48.07 PM.png (241.74 KiB) Viewed 8494 times
User avatar
torzdf
Posts: 2670
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: "command not found"

Post by torzdf »

Well, you're in the right place now anyway.

Code: Select all

python faceswap.py gui

My word is final

User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

Re: "command not found"

Post by UndercoverReptilian »

Any clues as to why I keep getting a "command not found"?

User avatar
torzdf
Posts: 2670
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: "command not found"

Post by torzdf »

Well, in the example above you have just entered the command gui, which I suspect is not a command, hence it not being found.

My word is final

User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

Re: "command not found"

Post by UndercoverReptilian »

Isn't it the command it suggests above?

I also tried:
'python /Users/****/faceswap faceswap.py gui'
and I get:
'/Users/
*/Documents/anaconda3/envs/deepfake/bin/python: can't find 'main' module in '/Users/****/faceswap'"

and 'python faceswap.py gui'
Just gets me:
'python: can't open file 'faceswap.py': [Errno 2] No such file or directory'

I followed the General Install Guide ( https://github.com/deepfakes/faceswap/b ... tall-guide ), and everything seems ok until I reach the last step where they say :
Once all these requirements are installed, you can attempt to run the faceswap tools. Use the -h or --help options for a list of options.

python faceswap.py -h

or run with gui to launch the GUI

python faceswap.py gui

User avatar
torzdf
Posts: 2670
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: "command not found"

Post by torzdf »

At this point, I'm not sure. Sorry.

Ultimately in your screen grab above faceswap.py IS found as it outputs the help message (it needs to execute faceswap to do this).

If you are getting a message that the file is not found, then you are most likely in the wrong folder.

The main issue, I don't know. It's definitely there.

My word is final

User avatar
bryanlyon
Site Admin
Posts: 793
Joined: Fri Jul 12, 2019 12:49 am
Answers: 44
Location: San Francisco
Has thanked: 4 times
Been thanked: 218 times
Contact:

Re: "command not found"

Post by bryanlyon »

UndercoverReptilian wrote: Wed Apr 22, 2020 5:13 am

'python /Users/*******/faceswap faceswap.py gui'

This is wrong, it should be

Code: Select all

python /Users/*******/faceswap/faceswap.py gui

If you are in the faceswap folder, running

Code: Select all

python faceswap.py gui

SHOULD work, however, you might need to try

Code: Select all

python ./faceswap.py gui

on some Linux distros. So might be the case on a Mac.

User avatar
UndercoverReptilian
Posts: 9
Joined: Mon Apr 20, 2020 8:52 am

Re: "command not found"

Post by UndercoverReptilian »

Thank you. I finally managed to reach the gui :)

Locked