python pip trouble installing from requirements.txt

前端 未结 6 2067
清酒与你
清酒与你 2020-12-13 00:12

I\'ve had great luck with pip in the past, but working at installing some stuff in a venv on is giving me some headaches. I keep getting errors like No distributions at

6条回答
  •  北海茫月
    2020-12-13 00:45

    I see a few problems:

    1. Your requirements.txt is for the base system Python, not any virtual environment. Django does not have any external dependencies.

    2. You are using the root user to install packages in your virtual environment (or you are using sudo when you shouldn't).

    The best option is to start from scratch:

    $ virtualenv myvenv
    ...
    $ source myvenv/bin/activate
    (myvenv) $ pip install django
    ...
    (myvenv) $ pip freeze > requirements.txt
    

提交回复
热议问题