create account

RE: [Python Tips] Virtual Environments by netscape101

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @themarkymark/python-tips-virtual-environments

· @netscape101 ·
Cool article, but I don't agree with using pipenv. From what I understand pipenv is just a wrapper for people who can't use virtualenv. Virtualenv is pretty easy for me to use and straightforward , so I'll stick to that for now.
Here are some links that are related for anyone interested:
* https://gist.github.com/Geoyi/d9fab4f609e9f75941946be45000632b - Install virtualenv on Ubuntu
* How to create and activate virtualenv: https://yoirtuts.com/index.php?title=Create_Virtual_Env_And_Activate_Python3
One of my favourite practices is to often cleanup my virtualenv and reinstall dependencies, especially in big projects with many dependencies. This helps me solve dependency issues,but can be a pain in the ass for development.

Create list of installed packages:
``` 
virt-env ) $ pip3 freeze > uninstall-requirements.txt

virt-env ) $ pip3 uninstall -r uninstall-requirements.txt -y

virt-env ) $  pip3 install -r requirements.txt
```
properties (22)
authornetscape101
permlinkre-themarkymark-python-tips-virtual-environments-20180523t144302717z
categoryprogramming
json_metadata{"tags":["programming"],"community":"busy","app":"busy/2.4.0"}
created2018-05-23 14:43:03
last_update2018-05-23 14:43:03
depth1
children14
last_payout2018-05-30 14:43:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length939
author_reputation45,783,947,118
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,278,157
net_rshares0
@themarkymark ·
Pipenv is not a wrapper, there is virtualenvwrapper that you are likely thinking of. 

Pipenv is a completely different project that works differently from virtualenv but does the same thing just better.
👍  
properties (23)
authorthemarkymark
permlinkre-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t145151539z
categoryprogramming
json_metadata{"tags":["programming"],"app":"steemit/0.1"}
created2018-05-23 14:51:51
last_update2018-05-23 14:51:51
depth2
children13
last_payout2018-05-30 14:51:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length203
author_reputation1,774,049,814,564,687
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,279,607
net_rshares521,883,790
author_curate_reward""
vote details (1)
@netscape101 ·
Ok fair enough. I work in Python everyday so I should have probably known that. 
What makes it better than virtualenv?
Btw here are some old notes of mine about virtualenv, not sure if it is still relevant, but it was pretty interesting when I learned about this: 
https://yoirtuts.com/index.php?title=Virtualenv_Correct_Usage
👍  
properties (23)
authornetscape101
permlinkre-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t145901166z
categoryprogramming
json_metadata{"tags":["programming"],"links":["https://yoirtuts.com/index.php?title=Virtualenv_Correct_Usage"],"app":"steemit/0.1"}
created2018-05-23 14:59:03
last_update2018-05-23 14:59:03
depth3
children12
last_payout2018-05-30 14:59:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length326
author_reputation45,783,947,118
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,280,795
net_rshares509,675,982
author_curate_reward""
vote details (1)
@themarkymark ·
WIthout getting complex, there are a lot of advantages.  I really recommend checking out the [project page](https://docs.pipenv.org) and within five minutes I will bet you will see the advantages.

It is not just an ease of use wrapper, it's a complete makeover on how virtual environments work on python and puts it in the same league as NodeJS's package manager.
properties (22)
authorthemarkymark
permlinkre-netscape101-re-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t151908024z
categoryprogramming
json_metadata{"tags":["programming"],"links":["https://docs.pipenv.org"],"app":"steemit/0.1"}
created2018-05-23 15:18:12
last_update2018-05-23 15:18:12
depth4
children6
last_payout2018-05-30 15:18:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length364
author_reputation1,774,049,814,564,687
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,284,194
net_rshares0
@throwawayaccount ·
$0.09
@netscape101 check here:
https://www.reddit.com/r/learnpython/comments/6qrhwd/pipenv_vs_pip_and_virtualenv/
https://docs.pipenv.org/
https://stackoverflow.com/questions/41573587/what-is-the-difference-between-venv-pyvenv-pyenv-virtualenv-virtualenvwrappe
http://docs.python-guide.org/en/latest/dev/virtualenvs/
Lots of reading :) Enjoy. I'm also still using virtualenv, but slowly gonna move to pip-env.
👍  ,
properties (23)
authorthrowawayaccount
permlinkre-netscape101-re-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t150107913z
categoryprogramming
json_metadata{"tags":["programming"],"users":["netscape101"],"links":["https://www.reddit.com/r/learnpython/comments/6qrhwd/pipenv_vs_pip_and_virtualenv/","https://docs.pipenv.org/","https://stackoverflow.com/questions/41573587/what-is-the-difference-between-venv-pyvenv-pyenv-virtualenv-virtualenvwrappe","http://docs.python-guide.org/en/latest/dev/virtualenvs/"],"app":"steemit/0.1"}
created2018-05-23 15:01:09
last_update2018-05-23 15:01:09
depth4
children4
last_payout2018-05-30 15:01:09
cashout_time1969-12-31 23:59:59
total_payout_value0.074 HBD
curator_payout_value0.014 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length403
author_reputation-479,586,892,695
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,281,179
net_rshares23,252,430,409
author_curate_reward""
vote details (2)