Hacker News new | past | comments | ask | show | jobs | submit login

Is there a command needed in pipenv like the one needed in virtualenv? eg.

  > source env/bin/activate
How does one activate one environment over another?

Why is pipsi a separate thing?




Based on install.rst[0]

It seems it keeps a ledger somewhere (haven't dug into it). Then to run commands, instead of using `python main.py`, you now use `pipenv run python main.py` and it automates things. It still depends on Virtualenv.

As an alternative, Pyenv + Pyenv Virtualenv work by creating the environments in a separate folder. You can then `cd` into a project root folder and there use `pyenv local x` and every time you `cd` into the directory or a subdirectory, it looks up the tree until it finds a `.local` file. This specifies the environment. It can be a Python version or a Virtualenv and it loads it.

[0] https://github.com/pypa/pipenv/blob/4f2295a1dbf7fe6fa36ef4ec... [1] https://github.com/pypa/pipenv/blob/4f2295a1dbf7fe6fa36ef4ec...


when you want to run a command 'inside' the pipenv of the current directory, do:

    > pipenv run {command}
This mirrors how npm works.

There's also:

    > pipenv shell
to give you a shell in which the environment is setup correctly for you


You just cd into your project's directory and run "pipenv shell" and it activates the virtualenv for you.


pyenv/pipenv are for your development. pipsi is for installing Python tools/applications that you just want to use, like apt/yum.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: