Search code examples
pythoncommandzsh

Why does venv command give me parse error?


I am trying to follow the instructions of this codebase: https://github.com/obaghirli/syn10-diffusion

I used python3 -m venv venv instead of python3.8 -m venv venv as I do not have python3.8

I am getting an error in this command: (venv) python -m pip install -r requirements.txt that says zsh: parse error near python

I tried the same command with python3 also, but getting the same error. Any suggestions how to solve this?


Solution

  • Instead of using (venv) python -m pip install -r requirements.txt as a command you should do

    . ./venv/bin/activate
    python -m pip install -r requirements.txt