[Python] How to develop in Conda and deploy in pure python?

Discussão em 'Python' iniciado por Stack, Junho 23, 2025.

  1. Stack

    Stack Membro Participativo

    Hello dear colleagues,

    Started using python some time ago due to server restrictions, and currently there is a certain python environment running on a crontab job on a company linux server created with python's venv with all its packages.

    For added context: the scripts were created locally on VS Code and copied over to the server where they were tested/run under the production server.

    Now recently company employee's laptops are being equipped with Conda as the de-facto python development software of the company. (Cool we do not need to copy to the server each time we want to test a script, we have python locally yey!)

    To define a bit more our starting scenario:


    • Remote Server:
      • Linux red-hat
      • no sudo privileges
      • python 3.11, venv and pip

    • Local dev machine:
      • Windows 11
      • no admin permissions
      • conda with python 3.11

    My questions:

    1. Can I easily create a local Conda environment (lets call is "condaEnv") based on the remote VEnv environment (lets call it "pyEnv")? (if so, how?)
    2. Assuming I recreate a local "condaEnv" matching everything to the server pyEnv, how do I integrate them making sure I have the same packages etc? Do I have to install every single package on both my machine and the server each time I need a new package during development? How do I make sure they are in Sync? (this is just the same question asked in 3 different ways, I know)

    What I tried: Copy the server pyEnv folder to the local folder and activate it using conda, error: EnvironmentLocationNotFound: Not a conda environment

    Continue reading...

Compartilhe esta Página