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

Using pipenv #69

Merged
merged 6 commits into from
Jun 25, 2020
Merged

Using pipenv #69

merged 6 commits into from
Jun 25, 2020

Conversation

gogvale
Copy link
Contributor

@gogvale gogvale commented Jun 22, 2020

It is considered a good practice to use an environment on python projects.
This way we don't have to worry about incompatibility and breaking system packages.

I added instructions on how to use pipenv for the project and created a Pipfile (which is equivalent to requirements.txt). Worked on my machine (Ubuntu 19.10)

@mobeigi mobeigi self-assigned this Jun 23, 2020
Pipfile Outdated
[dev-packages]

[requires]
python_version = "3.7"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't seem to run my pipenv properly using Python 3.7 (complains about not being able to get Babel). Setting this to 3.8 however does work for me. Is this a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, let me check (3.7 seems to be my system's default python3 version)
Can you show the error?

Pipfile Outdated
@@ -0,0 +1,23 @@
[[source]]
url = "https://pypi.python.org/simple"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't really matter but this can be https://pypi.org/simple

@gogvale
Copy link
Contributor Author

gogvale commented Jun 25, 2020

I can't seem to use a python version not installed in my system using pipenv (using requirements.txt seems like an easy solution for the problem, since there's no need to specify a python version)

What do you think?

@iksaku
Copy link

iksaku commented Jun 25, 2020

To allow more Python versions, you can add the following to the Pipfile.lock:

[requires]
python_version ~=3.6# The rest of your packages

This will allow use of Python versions >=3.6 but <4

@mobeigi
Copy link
Owner

mobeigi commented Jun 25, 2020

@iksaku I don't think that is possible as described here:
pypa/pipenv#1050 (comment)

As of right now the solution is pretty clean. pipenv converts the requirements.txt file by default if no Pipfile is found.
Lets merge this!

@mobeigi mobeigi merged commit 5cc26f1 into mobeigi:master Jun 25, 2020
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

Successfully merging this pull request may close these issues.

3 participants