skip to Main Content

I developed an accounting software with django which will be only used on the local server of client’s computer. My question is: How do I setup the dependencies on clients computer? Do I install all dependencies individually? Or put my project onto a virtual env and move the virtual env into the clients PC? Or should I dockerize the app?

3

Answers


  1. It totally depends on the complexity of your project. Docker could be the best option, but if you have limited dependencies in your project, then virtual environment is enough.

    Login or Signup to reply.
  2. Start with what you need.

    local server of client’s computer

    Create a python virtual env and install dependencies there. Ensure that a requirements.txt is created and added to source control on the project.

    pip install -r requirements.txt
    

    You may want to create a service or systemd unit file to automatically start the server when the system starts up.

    Login or Signup to reply.
  3. As others have mentioned, you can use a virtual environment and install requirements from requirements.txt. An easy way to create these is running pip freeze > requirements.txt.

    However, this can still cause issues if the client has a different Python version installed. Dockerizing the app would ensure everything, from Python version to dependencies, will be the same between systems.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search