 # Python Virtual Environment Most beginner developers have a hard time understanding virtual environments, why they are useful and how to use them. I am going to explain why you want to use them, and then cover how to use them. There are a couple ways to use virtual environments, all solve the same problems but are set up differently. # What is a virtual environment? When you install a package with `pip` (or `conda`) you install that package in the current environment. If you do not have a virtual environment, that ends up being root. Installing packages in root is considered bad practice as different packages (and your own code) may require different versions of a package that may not work with other packages in other projects. Packages you will use globally on your operating system are typically installed in root, anything that is specific to a project should be installed in a virtual environment. A virtual environment simulates a fresh install of python where you can install only the packages required for your project and freeze the version as needed. Freezing a version means you install a version of a module like 1.5 and do not upgrade to future versions prior to testing the impact. A virtual environment also keeps all your modules from impacting other projects. One project may need requests 2.18.4 (the current latest version), but that version may cause problems (until a particular bug that affects your project is fixed). Using virtual environments you can install two different versions and keep both projects happy. Your code is only part of the problems, your dependencies can have dependencies. # Setting up and using a virtual environment. Before explaining how to set up a virtual environment, I will give an overview of the process, then I will cover each step in detail. #### Using a virtual environment * Create Virtual Environment * Activate Virtual Environment * Install Packages Requirements #### Creating a virtual environment There are quite a few ways to set up a virtual environment. A few common ways are: * `virtualenv` * `conda` * `pipenv` There are a few more but they are additive to the ones listed above. #### virtualenv `virtualenv` is the defacto standard for virtual environments. It is fairly easy to use but can be confusing to remember the syntax and until you have done it a lot of times you will need to look up the process. Normally I would recommend and teach you this method. #### conda If you are using Anaconda/Miniconda (I highly recommend you do!) then you have `conda` available to you. It is a package manager like pip but even more powerful. If you are using Anaconda I would typically recommend this over `virtualenv`, but this has changed with the final option available to us. #### **pipenv** This is the final option I am presenting to you, and it is the one I will cover in detail and recommend you use as well. `Pipenv` is a newer project that replaces `virtualenv` and makes the entire process easier and cleaner. It acts a bit like Nodejs's superior`npm` package manager. `pipenv` combines `pip` and `virtualenv` into one easy to use tool. It also has some security benefits as it uses hashes, something you won't need to worry about usually. You will most likely need to install `pipenv` as it is not usually included in most python distributions by default. This will be used as a systemwide package and will not be installed in a virtual environment. #### Install `pipenv` `python3 -m pip install pipenv` Once `pipenv` is installed, creating and using environments is fun and easy. #### Creating a virtual environment Change to the directory of your project or create a new folder if you are starting a new project. From there you just use `pipenv` like you would use for `pip`. If it is the first time installing a package in that folder, a new `Pipfile` and `Pipefile.lock` file. These files will manage what packages and versions you have installed for your project (this folder and downward). After you install the packages you need for your project using `pipenv install [PACKAGE]`. Once you have finished installing all the packages you need for your project you will need to activate your virtual environment. `pipenv` will remind you after each package is installed wiht the following message: To activate this project's virtualenv, run the following: $ pipenv shell Just use `pipenv shell` to switch to your virtual environment. While using your virtual environment you will see the name of the virtual environment on the left of your command prompt. https://i.imgur.com/VMl6nm0.png That's it, you now have a virtual environment with just the packages you installed. The versions of all the packages is maintained by `pipenv` and will ensure no other project will impact this project. You can use `pipenv graph` to list the packages you have installed in your virtual environment. https://i.imgur.com/xkoq9ar.png #### Exit virtual environment When you are done with this project or want to switch virtual environments, you can just type in `exit` and you will be returned to a normal command prompt. #### But wait! There's more! One thing that `pipenv` brings to the table that Nodejs also does very well is dev dependencies. These are packages you only need during development but will not be installed during production. When installing a package that should only be used for development (say for example a package that reloads a server when the code base changes or a test framework) you use the `--dev` parameter. `pipenv install pytest --dev` You don't want a test framework installed in production, this allows you to maintain a separate list of packages that will not be installed unless you use `pipenv install --dev` to install all de v dependencies. This is extremely useful when working on multiple machines or with multiple users. This should give you everything you need to create and use virtual environments to create safe project environments during your python development. If you have any questions or need more information, check out the [pipenv project page](https://github.com/pypa/pipenv). # My Python Tips Series * [f-strings in Python 3.6](https://steemit.com/programming/@themarkymark/python-tips-f-strings-in-python-3-6-and-why-you-should-be-using-them) * [Underscores in numeric literals](https://steemit.com/programming/@themarkymark/python-tips-underscores-in-numeric-literals) * [A better interactive shell](https://steemit.com/programming/@themarkymark/python-tips-a-better-interactive-shell) * [Secrets Module - New in 3.6](https://steemit.com/programming/@themarkymark/python-tips-secrets-module-new-in-3-6) * [PEP 8](https://steemit.com/programming/@themarkymark/python-tips-pep-8) * [Slices](https://steemit.com/programming/@themarkymark/python-tips-slices) * [Named Tuples](https://steemit.com/programming/@themarkymark/python-tips-named-tuples) * [Destructuring](https://steemit.com/programming/@themarkymark/python-tips-destructuring) * [Counter](https://steemit.com/programming/@themarkymark/python-tips-counter) * [Type Annotation](https://steemit.com/programming/@themarkymark/python-tips-type-annotation) * [Jupyter Notebooks](https://steemit.com/programming/@themarkymark/python-tips-jupyter-notebooks) * [Getting Help](https://steemit.com/programming/@themarkymark/python-tips-getting-help) <center><sub><sub> X48EJ </sub></sub></center> # <center> [Why you should vote me as witness](https://steemit.com/witness-category/@themarkymark/why-you-should-vote-for-themarkymark-as-witness) </center> # <center>https://steemitimages.com/DQmcWxV1dpA1eAtw2ipwZiWZkydyVNU5LaLa2Ak1GUnbGmS/The-Marky-Mark.png </center> # <center> Witness & Administrator of four full nodes </center> #  </br> # <center> My recent popular posts </center> # [STEEM, STEEM Power, Vests, and Steem Dollars. wtf is this shit?](https://steemit.com/steem/@themarkymark/steem-steem-power-vests-and-steem-dollars-wtf-is-this-shit) [The truth and lies about 25% curation, why what you know is FAKE NEWS](https://steemit.com/curation/@themarkymark/the-truth-and-lies-about-25-curation-why-what-you-know-is-fake-news) [WTF is a hardware wallet, and why should you have one?](https://steemit.com/bitcoin/@themarkymark/wtf-is-a-hardware-wallet-and-why-should-you-have-one) [GINABOT - The Secret to your Sanity on Steemit](https://steemit.com/ginabot/@themarkymark/ginabot-the-secret-to-your-sanity-on-steemit) [How to calculate post rewards](https://steemit.com/steemit/@themarkymark/how-to-calculate-post-rewards) [Use SSH all the time? Time for a big boy SSH Client](https://steemit.com/linux/@themarkymark/use-ssh-all-the-time-time-for-a-big-boy-ssh-client) [How to change your recovery account](https://steemit.com/steemit/@themarkymark/how-to-change-your-recovery-account) [How curation rewards work and how to be a kick ass curator](https://steemit.com/curation/@themarkymark/how-curation-rewards-work-and-how-to-be-a-kick-ass-curator) [Markdown 101 - How to make kick ass posts on Steemit](https://steemit.com/steemit/@themarkymark/markdown-101-how-to-make-kick-ass-posts-on-steemit) [Work ON your business, not in your business! - How to succeed as a small business](https://steemit.com/business/@themarkymark/work-on-your-business-not-in-your-business-how-to-succeed-as-a-small-business) [You are not entitled to an audience, you need to earn it!](https://steemit.com/steemit/@themarkymark/you-are-not-entitled-to-an-audience-you-need-to-earn-it) [How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!](https://steemit.com/sysadmin/@themarkymark/how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong) [Building a Portable Game Console](https://steemit.com/raspberrypi/@themarkymark/building-a-portable-game-console) [](https://v2.steemconnect.com/sign/account-witness-vote?witness=themarkymark&approve=1)
author | themarkymark |
---|---|
permlink | python-tips-virtual-environments |
category | programming |
json_metadata | {"community":"busy","app":"busy/2.4.0","format":"markdown","users":["themarkymark"],"links":["https://github.com/pypa/pipenv","https://steemit.com/programming/@themarkymark/python-tips-f-strings-in-python-3-6-and-why-you-should-be-using-them","https://steemit.com/programming/@themarkymark/python-tips-underscores-in-numeric-literals","https://steemit.com/programming/@themarkymark/python-tips-a-better-interactive-shell","https://steemit.com/programming/@themarkymark/python-tips-secrets-module-new-in-3-6","https://steemit.com/programming/@themarkymark/python-tips-pep-8","https://steemit.com/programming/@themarkymark/python-tips-slices","https://steemit.com/programming/@themarkymark/python-tips-named-tuples","https://steemit.com/programming/@themarkymark/python-tips-destructuring","https://steemit.com/programming/@themarkymark/python-tips-counter"],"tags":["programming","python","python-tips","dev","busy"]} |
created | 2018-05-23 03:21:33 |
last_update | 2018-05-23 03:21:33 |
depth | 0 |
children | 28 |
last_payout | 2018-05-30 03:21:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 113.823 HBD |
curator_payout_value | 3.163 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 10,334 |
author_reputation | 1,774,051,228,325,611 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,190,112 |
net_rshares | 30,013,921,557,610 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 82,790,059,036 | 0.25% | ||
germanaure | 0 | 2,055,999,396 | 100% | ||
cryptogee | 0 | 162,071,081,752 | 100% | ||
thecryptodrive | 0 | 11,739,169,238 | 20% | ||
dimon14 | 0 | 15,076,217,531 | 89% | ||
kiddarko | 0 | 15,507,706,281 | 12.5% | ||
kenistyles | 0 | 10,091,510,657 | 11% | ||
dadview | 0 | 2,919,987,489 | 7.5% | ||
busy.pay | 0 | 642,211,402,297 | 6.94% | ||
jamzed | 0 | 25,691,014,633 | 100% | ||
adventureevryday | 0 | 10,686,595,575 | 25% | ||
samuelhull | 0 | 6,637,150,586 | 100% | ||
demartini | 0 | 11,786,180,685 | 100% | ||
steemcenterwiki | 0 | 1,034,859,854 | 5% | ||
playfulfoodie | 0 | 52,997,477,346 | 20% | ||
buzzbeergeek | 0 | 12,083,893,440 | 25% | ||
melip | 0 | 22,274,835,086 | 25% | ||
kkugel2 | 0 | 749,461,340 | 100% | ||
freebornsociety | 0 | 446,768,020 | 1% | ||
steemitcitizen | 0 | 990,423,734 | 12.5% | ||
nicnas | 0 | 19,179,765,049 | 50% | ||
denisechips | 0 | 11,011,941,721 | 25% | ||
artedellavita | 0 | 13,383,966,938 | 100% | ||
diogogomes | 0 | 178,543,283 | 69% | ||
lazzelazer | 0 | 7,424,741,930 | 100% | ||
derrick829 | 0 | 14,419,532,113 | 1% | ||
assetminds | 0 | 2,824,032,227 | 100% | ||
epixar | 0 | 602,556,494 | 100% | ||
pastbastard | 0 | 23,044,816,641 | 100% | ||
minnowbooster | 0 | 19,372,862,468,339 | 35% | ||
sanja-cash | 0 | 2,562,141,591 | 50% | ||
hope-on-fire | 0 | 952,787,132 | 100% | ||
krazypoet | 0 | 51,229,460 | 0.25% | ||
jejangkit | 0 | 199,441,886 | 100% | ||
tymba | 0 | 2,509,262,874 | 71% | ||
alexzicky | 0 | 13,139,329,434 | 25% | ||
purepinay | 0 | 14,407,424,571 | 5% | ||
cryptokeepr | 0 | 10,873,925,638 | 10% | ||
jjb777 | 0 | 9,558,098,308 | 100% | ||
topkpop | 0 | 11,481,328,270 | 10% | ||
joalvarez | 0 | 13,352,966,178 | 30% | ||
vox00 | 0 | 601,515,098 | 100% | ||
shintamonica | 0 | 79,097,506 | 100% | ||
torico | 0 | 2,798,505,318 | 5% | ||
hairshares | 0 | 168,107,039,465 | 100% | ||
magnat | 0 | 10,234,228,074 | 13% | ||
simplifylife | 0 | 151,608,773 | 0.25% | ||
kriptonoob | 0 | 1,803,970,345 | 2.5% | ||
yabapmatt | 0 | 1,146,970,189,255 | 100% | ||
makerhacks | 0 | 10,491,931,628 | 20% | ||
isnochys | 0 | 2,930,568,925 | 10% | ||
erodedthoughts | 0 | 18,725,380,364 | 25% | ||
shahab3211 | 0 | 610,288,358 | 100% | ||
andrekweku | 0 | 92,525,090 | 12.5% | ||
zeddjacob | 0 | 1,360,059,948 | 100% | ||
yulem | 0 | 3,152,518,495 | 100% | ||
stabilowl | 0 | 53,800,343,892 | 38% | ||
ocupation | 0 | 15,594,430,439 | 100% | ||
drmincu | 0 | 3,708,052,731 | 100% | ||
steemusa | 0 | 8,523,298,548 | 13% | ||
michelleast | 0 | 610,474,377 | 100% | ||
cryptogem | 0 | 24,278,566,409 | 100% | ||
dieterhubert | 0 | 502,704,763 | 100% | ||
nelkeljdm | 0 | 7,688,102,420 | 10% | ||
voaputra | 0 | 424,162,812 | 100% | ||
amos811 | 0 | 5,530,924,331 | 100% | ||
doverun | 0 | 468,339,472 | 100% | ||
gilc | 0 | 612,069,840 | 100% | ||
patricklancaster | 0 | 1,414,032,699 | 12.5% | ||
steemernoob | 0 | 535,713,809 | 100% | ||
thecreativerebel | 0 | 2,422,954,755 | 100% | ||
saqibnazir | 0 | 207,723,067 | 100% | ||
investfourmore | 0 | 17,641,284,684 | 20% | ||
niko3d | 0 | 3,993,023,641 | 100% | ||
khurramzaheer007 | 0 | 1,694,400,059 | 100% | ||
nwjordan | 0 | 9,679,072,227 | 75% | ||
solascriptura | 0 | 598,401,178 | 100% | ||
etemi | 0 | 29,660,927,971 | 100% | ||
dasvinni | 0 | 610,390,398 | 100% | ||
tuts | 0 | 602,933,425 | 100% | ||
erarnitox | 0 | 306,311,103 | 100% | ||
ipromote | 0 | 7,756,314,092,114 | 100% | ||
jvhplays | 0 | 5,749,552,055 | 100% | ||
aperfectionist | 0 | 552,981,988 | 100% | ||
nightdragon | 0 | 578,559,416 | 100% | ||
netscape101 | 0 | 999,946,266 | 100% | ||
elnomadadigital | 0 | 311,319,856 | 100% | ||
ambitiouslife | 0 | 12,819,231,300 | 100% | ||
ptrck | 0 | 610,390,398 | 100% | ||
natsch | 0 | 485,914,942 | 100% | ||
luli1 | 0 | 204,891,544 | 100% | ||
gtmatze | 0 | 1,033,435,514 | 100% | ||
jvhteach | 0 | 5,700,144,829 | 100% | ||
kessielynbote | 0 | 253,987,402 | 100% | ||
pynchon | 0 | 341,818,623 | 100% | ||
vladcraciun | 0 | 1,522,903,149 | 100% | ||
privacybydesign | 0 | 594,301,154 | 100% | ||
blerdrage | 0 | 4,781,992,188 | 100% | ||
khayziljoy | 0 | 51,954,924 | 100% | ||
suntree | 0 | 668,649,980 | 100% | ||
kelvo | 0 | 204,458,207 | 35% | ||
euriguiwi2018 | 0 | 552,376,772 | 100% | ||
finanzamt | 0 | 613,176,829 | 100% | ||
andreasgrubhofer | 0 | 1,496,763,611 | 100% | ||
jr876 | 0 | 603,663,316 | 100% | ||
kryptogermany | 0 | 1,507,583,946 | 100% | ||
fresherworld87 | 0 | 64,080,959 | 100% | ||
prlndra | 0 | 15,009,763,430 | 75% | ||
china-mobile | 0 | 435,342,340 | 100% | ||
joy10 | 0 | 590,960,262 | 100% | ||
donnjoez | 0 | 565,802,670 | 100% | ||
phimes | 0 | 611,952,180 | 100% | ||
deriom | 0 | 392,563,402 | 100% | ||
unmesh | 0 | 436,429,134 | 100% | ||
thoughtfulonion | 0 | 606,582,366 | 100% | ||
az88822 | 0 | 473,291,304 | 100% | ||
shibleehossain | 0 | 342,960,727 | 100% | ||
renulia | 0 | 613,808,228 | 100% | ||
yachtdesigner | 0 | 434,379,640 | 100% | ||
showshidan | 0 | 158,951,287 | 100% | ||
cocosarayhenry | 0 | 214,420,185 | 100% | ||
chris.geese | 0 | 603,633,639 | 100% | ||
kwekuabeiku | 0 | 76,288,839 | 12.5% | ||
gibdol | 0 | 543,204,176 | 100% | ||
shanejms2 | 0 | 112,892,774 | 100% |
nice post important informations
author | amenkh |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t040012469z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 04:00:12 |
last_update | 2018-05-23 04:00:12 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 04:00:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 33 |
author_reputation | 3,542,210,242 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,194,775 |
net_rshares | 564,611,118 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 564,611,118 | 100% |
Hi @themarkymark An interesting work. Well-written, very well-documented. My son studying Computer Science in college. Python applications will often use packages and modules that donβt come as part of the standard library. Applications will sometimes need a specific version of a library, because the application may require that a particular bug has been fixed or the application may be written using an obsolete version of the libraryβs interface. This means it may not be possible for one Python installation to meet the requirements of every application. If application A needs version 1.0 of a particular module but application B needs version 2.0, then the requirements are in conflict and installing either version 1.0 or 2.0 will leave one application unable to run. The solution for this problem is to create a virtual environment, a self-contained directory tree that contains a Python installation for a particular version of Python, plus a number of additional packages. Different applications can then use different virtual environments. To resolve the earlier example of conflicting requirements, application A can have its own virtual environment with version 1.0 installed while application B has another virtual environment with version 2.0. If application B requires a library be upgraded to version 3.0, this will not affect application Aβs environment. I'm wishing you success and growth, and happiness. A hug
author | euriguiwi2018 |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t044511326z |
category | programming |
json_metadata | {"tags":["programming"],"users":["themarkymark"],"app":"steemit/0.1"} |
created | 2018-05-23 04:45:12 |
last_update | 2018-05-23 04:45:12 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 04:45:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,436 |
author_reputation | 563,882,122,111 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,200,097 |
net_rshares | 0 |
It seems that virtual environments are becoming almost mandatory in more and more areas of delopment. In web development we see more and more people using Virtual Machines or Docker. I'm developing on Windows but a lot of production environments and build environments are running Linux. And then it's just a super practical thing to be able to replicate a Linux environment on my machine. It eliminates a lot of problems. Similarly it's basically not worth it to try to run Ruby on Rails in a Windows environment. But with a bit of setup. it's really not that difficult to setup a Linux environment in a container, so that you can keep using your favorite tools on Windows.
author | floede |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t073514603z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 07:35:15 |
last_update | 2018-05-23 07:35:15 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 07:35:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 677 |
author_reputation | 35,691,472,890 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,221,470 |
net_rshares | 531,039,646 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 531,039,646 | 100% |
Very good post, few give a moment to guide those who do not handle this information well ...
author | gilc |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t035837594z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 03:58:39 |
last_update | 2018-05-23 03:58:39 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 03:58:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 92 |
author_reputation | 10,954,045,529 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,194,568 |
net_rshares | 576,818,926 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 576,818,926 | 100% |
This is new to me. I Never came Python environment or the virtual environment concept you are talking about here. But hey, we learn everyday. Now I know.
author | greenblossom |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t042155717z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 04:21:57 |
last_update | 2018-05-23 04:21:57 |
depth | 1 |
children | 1 |
last_payout | 2018-05-30 04:21:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 153 |
author_reputation | 17,105,058,707 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,197,381 |
net_rshares | 552,403,310 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 552,403,310 | 100% |
Do you program in python?
author | themarkymark |
---|---|
permlink | re-greenblossom-re-themarkymark-python-tips-virtual-environments-20180523t152757710z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 15:27:00 |
last_update | 2018-05-23 15:27:00 |
depth | 2 |
children | 0 |
last_payout | 2018-05-30 15:27:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 25 |
author_reputation | 1,774,051,228,325,611 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,285,625 |
net_rshares | 0 |
Most deluxe work you are presinting here in your blog the great python application which have new modules and installment and many more packages yes it will work and definitely it will go for hihh note on application world it an interesting approaches for those who have difficult to find clusters of application on one package but python installment will solve this problem nicely you have shared a great idea i think it will go on top of top as soon as possible the way of its own valuable facts and figures
author | iqrimikri |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t045247255z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 04:52:57 |
last_update | 2018-05-23 04:52:57 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 04:52:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 509 |
author_reputation | 26,006,414,200 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,200,954 |
net_rshares | 0 |
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 ```
author | netscape101 |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t144302717z |
category | programming |
json_metadata | {"tags":["programming"],"community":"busy","app":"busy/2.4.0"} |
created | 2018-05-23 14:43:03 |
last_update | 2018-05-23 14:43:03 |
depth | 1 |
children | 14 |
last_payout | 2018-05-30 14:43:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 939 |
author_reputation | 45,783,947,118 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,278,157 |
net_rshares | 0 |
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.
author | themarkymark |
---|---|
permlink | re-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t145151539z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 14:51:51 |
last_update | 2018-05-23 14:51:51 |
depth | 2 |
children | 13 |
last_payout | 2018-05-30 14:51:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 203 |
author_reputation | 1,774,051,228,325,611 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,279,607 |
net_rshares | 521,883,790 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 521,883,790 | 100% |
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
author | netscape101 |
---|---|
permlink | re-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t145901166z |
category | programming |
json_metadata | {"tags":["programming"],"links":["https://yoirtuts.com/index.php?title=Virtualenv_Correct_Usage"],"app":"steemit/0.1"} |
created | 2018-05-23 14:59:03 |
last_update | 2018-05-23 14:59:03 |
depth | 3 |
children | 12 |
last_payout | 2018-05-30 14:59:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 326 |
author_reputation | 45,783,947,118 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,280,795 |
net_rshares | 509,675,982 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 509,675,982 | 100% |
@themarkymark hits the mark again :D nice posts, covers just the right amount of detail about virtual environments :-)
author | niko3d |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t070432717z |
category | programming |
json_metadata | {"tags":["programming"],"users":["themarkymark"],"app":"steemit/0.1"} |
created | 2018-05-23 07:04:33 |
last_update | 2018-05-23 07:04:33 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 07:04:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.023 HBD |
curator_payout_value | 0.002 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 118 |
author_reputation | 4,096,643,008,210 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,217,595 |
net_rshares | 6,996,520,916 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 543,247,454 | 100% | ||
dustsweeper | 0 | 6,453,273,462 | 3.74% |
I'm not currently working on python but when/if I start I'll make sure to refrence your posts. Very thurough information and insturctions.
author | prlndra |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t144814096z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 14:48:12 |
last_update | 2018-05-23 14:48:12 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 14:48:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 138 |
author_reputation | 131,224,886,868 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,279,009 |
net_rshares | 500,520,126 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 500,520,126 | 100% |
explaind very well virtual enivornment @themarkymark
author | samiurrehman10 |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t034001395z |
category | programming |
json_metadata | {"tags":["programming"],"users":["themarkymark"],"app":"steemit/0.1"} |
created | 2018-05-23 03:40:03 |
last_update | 2018-05-23 03:40:03 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 03:40:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 52 |
author_reputation | 795,180,052,204 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,192,228 |
net_rshares | 598,182,590 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 598,182,590 | 100% |
That's very useful tip! I didn't know you can have virtual environments like that. It will be very useful for packages that have dependence of other packages of a particular version.
author | stabilowl |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t034018567z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 03:40:18 |
last_update | 2018-05-23 03:40:18 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 03:40:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 182 |
author_reputation | 17,959,675,189,416 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,192,264 |
net_rshares | 589,026,734 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ptrck | 0 | 589,026,734 | 100% |
<h3>This post has received votes totaling more than $50.00 from the following pay for vote services:</h3> minnowbooster upvote in the amount of $95.19 STU, $144.00 USD. **For a total calculated value of $95 [STU,](http://steem.supply/rewards) $144 USD before curation, with a calculated curation of $3 USD.** This information is being presented in the interest of transparency on our platform **and is by no means a judgement as to the quality of this post.**
author | transparencybot |
---|---|
permlink | re-python-tips-virtual-environments--bidbot |
category | programming |
json_metadata | {"tags":["bidbot","transparencybot"],"links":["http://steem.supply/rewards"],"app":"null/null","format":"markdown"} |
created | 2018-05-23 03:46:51 |
last_update | 2018-05-23 03:46:51 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 03:46:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 468 |
author_reputation | -5,641,716,862,244 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,193,057 |
net_rshares | 0 |
interesting
author | vox00 |
---|---|
permlink | re-themarkymark-python-tips-virtual-environments-20180523t041232147z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-05-23 04:12:30 |
last_update | 2018-05-23 04:12:30 |
depth | 1 |
children | 0 |
last_payout | 2018-05-30 04:12:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 11 |
author_reputation | 92,077,347,631 |
root_title | "[Python Tips] Virtual Environments" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 57,196,223 |
net_rshares | 0 |