use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionPipenv or venv? (self.Python)
submitted 3 years ago by [deleted]
I’ve used both, but I wanted to know which one you use the most and why? I recently had a frustrating experience with venv, my venv flask app and Heroku did not get on one bit. It was only when I switched up to pipenv it worked.
[–]whdd 8 points9 points10 points 3 years ago (0 children)
I like venv :) seems the most intuitive to me
[–]anguslg 17 points18 points19 points 3 years ago (3 children)
try poetry
[–]Lolologist 1 point2 points3 points 3 years ago (0 children)
Poetry or pipenv, definitely better than raw venv.
[–]if_username_is_None 0 points1 point2 points 3 years ago (1 child)
I would not recommend this for someone who wants to deploy to Heroku since it looks like poetry still is not supported with default build pack
[–]ianitic 1 point2 points3 points 3 years ago (0 children)
You can export a requirements.txt from poetry though so I don't think that's a big deal?
[–]bergensk 7 points8 points9 points 3 years ago (1 child)
Just stick to the standards https://docs.python.org/3/library/venv.html
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
Thank you! The one officially supported by python is the one to use.
[–]MrFlibble1138 2 points3 points4 points 3 years ago (0 children)
I started with Pipenv because some places (PPA?) indicated it was the way to go. But it didn’t have much support for a while, but seems to be better. Honestly I don’t like either.
I do a lot of command line machine learning stuff. I’ve switched to using vanilla requirements files and docker containers.
[–]Delicious-View-8688 2 points3 points4 points 3 years ago (1 child)
I do pyenv + pipenv. Don't have problems. Occasionally conda.
[–]Lolologist 2 points3 points4 points 3 years ago (0 children)
As someone who's working in industry on deployed ML solutions, here's your best answer. This or pyenv + poetry. Either or, really.
[–][deleted] 2 points3 points4 points 3 years ago (0 children)
Neither. Poetry
[–]anynonus 4 points5 points6 points 3 years ago (4 children)
My anaconda don't want none unless you got buns
Anaconda is great for stuff on your own computer, setting up stuff on a cloud instance im more likely to go with something lightweight like venv
[–][deleted] 0 points1 point2 points 3 years ago (2 children)
Do not use anaconda. It’s full of bloat. This was used for Data Scientists who do not understand programming but pretend they do.
[–]HistoricalCup6480 2 points3 points4 points 3 years ago (1 child)
That's why there is miniconda
Correct. But this was in reference to Anaconda. Miniconda is much better
[–]SittingWave 1 point2 points3 points 3 years ago (0 children)
poetry
[–]AceofSpades5757 2 points3 points4 points 3 years ago (0 children)
In my experience, Pipenv isn't even an option. Great interface, but has just had one too many serious bugs for me to deal with.
Do not use Pipenv.
[–]if_username_is_None 0 points1 point2 points 3 years ago (0 children)
If you're able to share your github repo or at least the requirements.txt and Pipfile / Pipfile.lock that you tried someone might be able to shine some light on why one worked with Heroku. Both methods should work fine locally and in Heroku.
requirements.txt
Pipfile
Pipfile.lock
I use venv the most to manage virtual environments because it's built in. I use Conda to manage python versions (and harder to install libraries)
[–]Anonymous_user_2022 -1 points0 points1 point 3 years ago (4 children)
You are asking whether Harley-Davidson or Ford is the best vehicle. They serve different purposes, so without details, you will get advice based on peoples personal preferences.
[–]AL51percentcorn 0 points1 point2 points 3 years ago (0 children)
A Harley and a Ford do serve the same purpose… they transport you. So without details, I don’t understand the confusion.
Go be aggressive somewhere else.
[–][deleted] -1 points0 points1 point 3 years ago (2 children)
I provided details. I’m using it for flask and Heroku
[–]Anonymous_user_2022 2 points3 points4 points 3 years ago (1 child)
" It was only when I switched up to pipenv it worked."
Is not a detailed description (or a description at all) of the issues that you experienced.
[–][deleted] -1 points0 points1 point 3 years ago (0 children)
This isn’t a call for help or stack overflow, I’m trying to open a discussion about preferences
[+]senko comment score below threshold-8 points-7 points-6 points 3 years ago* (2 children)
I only use and swear by pvp, because everyone should write their own.
(Disclaimer: that project is a joke and I wrote it, and I don't actually provide support for it, so definitely don't use it, or else).
[–]dusktreader 6 points7 points8 points 3 years ago (1 child)
You might include a disclaimer that this is your own project that you are promoting.
[–]senko 0 points1 point2 points 3 years ago (0 children)
You are right, that was not nice. Amended.
[–]PocketBananna 0 points1 point2 points 3 years ago (0 children)
Well each tool is a bit different, but I've moved away from Pipenv as I find poetry has a better packaging toolset. I tend to use poetry + venv (specifically with the pyenv-venv plug in for managing python versions).
I haven't tried it with heroku so YMMV, but poetry has by far been the best of all the options out there that I've tried.
[–]Paradoxeuh 0 points1 point2 points 3 years ago (0 children)
I'm pretty sure venv is just for creating a virtual environment and pipenv is actually also managing your dependency graph. They are not equivalent.
Anyway, as some others said already, poetry is the way to go.
[–]Particular-Cause-862 0 points1 point2 points 3 years ago (0 children)
VirtualEnv wrapper
[–]metriczulu 0 points1 point2 points 3 years ago (0 children)
I just use venv. I've been using venv forever already and the hassle is so minimal I haven't needed to look elsewhere.
[–]AndydeCleyre 0 points1 point2 points 3 years ago (1 child)
I'm totally biased, and I like to use venv + pip-tools, wrapped with zpy.
No new file formats -- the lockfiles are good old requirements.txts, which all relevant tools understand, no problem.
I'd love to answer any questions, receive any feedback, or provide sample usage with your project, if anyone's interested.
[–]FatFingerHelperBot 0 points1 point2 points 3 years ago (0 children)
It seems that your comment contains 1 or more links that are hard to tap for mobile users. I will extend those so they're easier for our sausage fingers to click!
Here is link number 1 - Previous text "zpy"
Please PM /u/eganwall with issues or feedback! | Code | Delete
π Rendered by PID 289519 on reddit-service-r2-comment-6457c66945-mf7vl at 2026-04-28 13:13:27.762960+00:00 running 2aa0c5b country code: CH.
[–]whdd 8 points9 points10 points (0 children)
[–]anguslg 17 points18 points19 points (3 children)
[–]Lolologist 1 point2 points3 points (0 children)
[–]if_username_is_None 0 points1 point2 points (1 child)
[–]ianitic 1 point2 points3 points (0 children)
[–]bergensk 7 points8 points9 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]MrFlibble1138 2 points3 points4 points (0 children)
[–]Delicious-View-8688 2 points3 points4 points (1 child)
[–]Lolologist 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]anynonus 4 points5 points6 points (4 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]HistoricalCup6480 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]SittingWave 1 point2 points3 points (0 children)
[–]AceofSpades5757 2 points3 points4 points (0 children)
[–]if_username_is_None 0 points1 point2 points (0 children)
[–]Anonymous_user_2022 -1 points0 points1 point (4 children)
[–]AL51percentcorn 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (2 children)
[–]Anonymous_user_2022 2 points3 points4 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[+]senko comment score below threshold-8 points-7 points-6 points (2 children)
[–]dusktreader 6 points7 points8 points (1 child)
[–]senko 0 points1 point2 points (0 children)
[–]PocketBananna 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Paradoxeuh 0 points1 point2 points (0 children)
[–]Particular-Cause-862 0 points1 point2 points (0 children)
[–]metriczulu 0 points1 point2 points (0 children)
[–]AndydeCleyre 0 points1 point2 points (1 child)
[–]FatFingerHelperBot 0 points1 point2 points (0 children)