Search code examples
pythoncentos7

Can I use enviorment django project (made in windows) on centos?


I have a Django project made on windows(in virtual environment and python 3.7, postgres15). I install python 3.7 and postgres15 on centos7. Can I use this environment folder on Centos7 without install requirements.txt library packages on centos7 or I have to install requirements.txt library packages?


Solution

  • You need to recreate the virtual environment in CentOs machine and install packages from requirements.txt.

    python3.7 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt