Reputation: 227
I am having a problem with launching to heroku via my virtual enviorment and i think it is because my virtual enviorment is set up incorrect.
In order to test that i have set it up correctly this is what i have done.
pip3 uninstall pipenv
pip3 install pipenv
pipenv install django
pipenv shell
No when i opened the pipenv shell in step 7 i thought i would see (django2) $
in my terminal. Instead i am getting pulled back to my user profile seeing (my name) $
what is the story here?
because in order to launch multiple projects to heroku i will need multiple "pipfles" and "piplock" files. along with each project having its own "Procfile".
but the way it seems to currently be set up is that i only have one "pipfles" and "piplock" file located in my user account.
Upvotes: 0
Views: 1896
Reputation: 21
You may set Custom Virtual Environment Location,
"you can also have Pipenv stick the virtualenv in project/.venv by setting the PIPENV_VENV_IN_PROJECT environment variable"
https://pipenv.pypa.io/en/latest/virtualenv/#custom-virtual-environment-location
add a new environment variable named PIPENV_VENV_IN_PROJECT, and set it to 'true',
save, restart, cd into your project folder and run
pipenv install django
,
when you run pipenv shell
, the .venv inside your project is up and running.
Upvotes: 1
Reputation: 1050
I guess you have a Pipfile
in your home directory.
By default, pipenv search up to 3 parent directories for the Pipfile.
This can be changed with PIPENV_MAX_DEPTH
Upvotes: 1