deepfakes / faceswap

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

Improved dependency handling #42

Closed Ganonmaster closed 6 years ago

Ganonmaster commented 6 years ago

Ensure that all dependencies are met prior to execution and provide helpful messages to the user in case they are missing.

GSonderling commented 6 years ago

I think that this needs some explanation. The python already tells you if you try to import nonexistent module, and in a pretty clear way. ModuleNotFoundError: No module named

Don't get me wrong, I'm all for user-friendliness but I can't see how someone could misinterpret that message.

Of course it is trivial to check all the dependencies before, in the faceswap.py or even in specialized bash/powershell script, but it feels kind of superfluous.

Could you explain how do you imagine the it should behave?

Ganonmaster commented 6 years ago

Don't get me wrong, I'm all for user-friendliness but I can't see how someone could misinterpret that message.

Your assumption is that someone has prior experience with python and python dependency management. While you and I know what it means, I'm pretty sure that's not representative of the users we would like to reach. I would like to get to a point where the end-user doesn't have to worry about installing Python, or managing dependencies at all.

Perhaps we want to manage the dependencies for the end-user, perhaps we want to ship the tool as a precompiled package, perhaps we want to only nudge/guide the user in the right direction; tell them how to manage the dependencies. While this was just one initial idea back in December, there are many other ways of approaching this. None of these issues are set in stone, feel free to contribute your opinion on it.

GSonderling commented 6 years ago

Well if it comes down to making things simple for the end user, and if we assume almost complete ignorance on their end, there is nothing that beats the old school, downloadable binary installer.

Everyone is familiar with it, and everyone is comfortable with it. Too much if you ask me but that would work in our favor.

Sadly such arrangement is not exactly great for more advanced users, and right now those are more likely to use this project.

Anyway, I think that creating a script in bash and powershell would be a fitting for most potential users. Letting it handle dependencies, environment setup etc. while still providing user with easy way to review it.

Additional checks could be implemented in python, but that already assumes python runs properly.

Ganonmaster commented 6 years ago

While my preference is usually going with the Python package that comes with my distro + virtualenv + pip, like you said, you can't always count on the right Python version being installed. I think Anaconda was suggested at some point, and that could solve a lot of those issues. Anaconda/Conda manages both the environment and packages, meaning that it can also manage different Python versions available on the same machine. I have little experience with this myself, but one would assume that Conda would allow for a bunch more automation in setting up the environment, by means of a bash or powershell script.

GSonderling commented 6 years ago

Especially since deepfakes relies on python 3.6. Older versions of popular distros, such as Ubuntu, don't have it in their default package repositories. And let's face it, most people still have old 2.7 on their machines as default python.

Basically, it would be safer to assume that we start from scratch and that user doesn't have anything.

torzdf commented 6 years ago

Again, I'm closing this as it has been several months with no progress. If this is problematic, please feel free to reopen.