Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SETUP] Use of VENV (Python virtual environment) #14

Open
ArthurFleischman opened this issue May 12, 2020 · 9 comments
Open

[SETUP] Use of VENV (Python virtual environment) #14

ArthurFleischman opened this issue May 12, 2020 · 9 comments

Comments

@ArthurFleischman
Copy link

ArthurFleischman commented May 12, 2020

Python virtual environment allows with one command the use of the same interpreters and packages by all devs

@jgabriel1
Copy link

Agreed. It would be best practice to work inside an isolated virtualenv and also making a requirements.txt file containing all the dependencies in the repo.

@jbarbosaamancio
Copy link
Contributor

same this @jgabriel1

@ArthurFleischman
Copy link
Author

@jbarbosaamancio sorry, typo error, it would be "same as ".
hope i helped.

@felipemarkson
Copy link

felipemarkson commented May 13, 2020

We can use Poetry as the package and dependencies manager. See #16 and my PR #17.

@jgabriel1
Copy link

This poetry definitely looks cleaner than installing through pip. Does it eliminate the need for a virtualenv though? @felipemarkson

If not, in this specific case, it's just another way of using $ pip freeze > requirements.txt whenever you install a new dependency.

@jgabriel1
Copy link

Anyways, this really short tutorial should help with setting up the virtualenv on Mac:
https://gist.github.com/pandafulmanda/730a9355e088a9970b18275cb9eadef3

@felipemarkson
Copy link

This poetry definitely looks cleaner than installing through pip. Does it eliminate the need for a virtualenv though? @felipemarkson

Actually, Poetry uses a virtualenv to manager the dependencies. Poetry has pip freeze equivalent to a production environment. However, Poetry helps a lot in development environment because it is separate the product dependencies and developer dependencies, like npm or yarn, and resolve the dependencies requirements.

If not, in this specific case, it's just another way of using $ pip freeze > requirements.txt whenever you install a new dependency.

Pip has not a good dependencies manager when the dependencies need a specific version, and the project can be a mess when others developers change the dependencies.

An alternative to Poetry is Pipenv, other dependency manager.

@felipemarkson
Copy link

In a small project, without others developers pip works fine.
But if you need a development environment that can be used by others developers, a dependency manager is essential.

@jgabriel1
Copy link

Ok, got it! Just to be clear, I also think it's a good idea to use a more robust package manager than pip. It's just that I thought the main concern of this issue was to help people set up the venv itself.

An alternative to Poetry is Pipenv, other dependency manager.

I've heard of pipenv. If this is the case then it's an all-in-one thing as well.

Thanks for the tip on poetry though, will definitely check it out for myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants