{"componentChunkName":"component---src-templates-post-tsx","path":"/development_environment/packages_and_environments/","result":{"data":{"logo":{"childImageSharp":{"gatsbyImageData":{"layout":"fixed","backgroundColor":"#f8f8f8","images":{"fallback":{"src":"/static/e43c6530b7b2b056de6bfee951c9e393/b181d/compasslogo.png","srcSet":"/static/e43c6530b7b2b056de6bfee951c9e393/b181d/compasslogo.png 1920w","sizes":"1920px"},"sources":[{"srcSet":"/static/e43c6530b7b2b056de6bfee951c9e393/e02c9/compasslogo.webp 1920w","type":"image/webp","sizes":"1920px"}]},"width":1920,"height":472}}},"mdx":{"body":"const _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nconst _frontmatter = {\n  \"layout\": \"post\",\n  \"title\": \"Package Managers and Virtual Environments Explained, Step by Step\",\n  \"author\": [\"Boris Giba\"],\n  \"tags\": [\"Development Environment\"],\n  \"image\": \"img/PackagesAndEnvironments/PackagesThumbnail.png\",\n  \"date\": \"2021-01-22T19:44:03.128Z\",\n  \"dateModified\": \"2021-01-22T19:44:03.128Z\",\n  \"changelog\": [],\n  \"draft\": false,\n  \"uniquePostId\": 1,\n  \"timeToRead\": 10,\n  \"imgCaption\": \"Background image by Ciprian Boiciuc\",\n  \"imgSource\": \"https://unsplash.com/photos/CXdeJI3bD2U\",\n  \"excerpt\": \"In this post, we will cover what package managers and virtual environments are, why you should use them and how you can do so. If you have heard of tools such as pip, virtualenv, venv,conda, or maybe even used them before, but you did not fully understand what was going on under the hood, this post is for you.\",\n  \"dependencies\": [\"Python\"],\n  \"proficiencyLevel\": \"Beginner\"\n};\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n  return mdx(\"div\", props);\n};\n\nconst HelpfulTip = makeShortcode(\"HelpfulTip\");\nconst layoutProps = {\n  _frontmatter\n};\nconst MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  let {\n    components\n  } = _ref,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", {\n    \"id\": \"package-managers\"\n  }, `Package Managers`), mdx(\"p\", null, `Let’s first tackle the topic of `, mdx(\"em\", {\n    parentName: \"p\"\n  }, `package managers`), `. Python is a very versatile language, which can be used for different purposes (Machine Learning, Web Development, …). When you install Python on your local machine, imagine that your computer creates a separate space for your Python installation, sort of like a “box”, where all of your personal “Python-belongings” go to. You can put more than just the default Python installation inside that box. If you have installed packages for Python before, you have likely come across the term “pip” as in `, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, `pip install numpy`), ` for example. “pip” is a so-called `, mdx(\"em\", {\n    parentName: \"p\"\n  }, `package manager`), `, a piece of software that manages external packages on-top of your existing Python installation. So when you run `, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, `pip install numpy`), `, pip will download and place the NumPy-package inside your Python-box. Your imaginary box now looks like this:`), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1280px\"\n    }\n  }, `\n      `, mdx(\"span\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.199999999999996%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB2ElEQVQoz5WSzYriQBDHfZVl3mGfZ95DL17H3AY8qogKojLk4GkEwaBRE4mInyAxCfErMYmCJIGedC3VEyUDC8s2/FNdlapfV6qTAoBUNpv9VSwWf6fT6Zd8Pt+o1WrQbreh0WhApVKBZrMJPM9DqVSCcrkMhUKBxTE3k8m8YC0ykJXCR7/f5z3Pg/P5TFzXjW6329f1emXyPO+pRwyFOY7jRJZlEaxFxhO42WzQwUUAgP6nsAZixjdwPp8zYBRFhFJKoyhCl4ZhiF2D4zjgui6zp9MJ7vc7jfMxlwFjxjdwsVgwIKWUxJa1axgGmKYJ0+kUJEkCRVFA13VQVRViIDyAMePvwLhDBkQAwhA6m81gu92yQxKL1SyXy38DNU0DWZYZaLVawXq9BlEUYTwesxEcj0ccAblcLtDr9X4AP2JgiCfGn0F0XSeO4xDTNMlutyOapuGNElmWmW8YBuaE2HG32/1IAj+Ts0vOMAgCOBwObI8d+b6PFwD7/R4sy2LvbNvG3+bzCaxWq6+DweBdEIQ3QRByKFEUc61WK9fpdDhZljlJkphFn+d5TlEUbjgccqPR6G0ymbzX6/XXZIfMUkqfQl/X9VQQBGz/kO/7Kdu2f8RQqqoy+wdDkO4uvdHcFgAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), `\n  `, mdx(\"picture\", {\n    parentName: \"span\"\n  }, `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/097a1ef6118a773929e72517fc04585b/601b1/boxGraphicFirstInstall.webp 500w\", \"/static/097a1ef6118a773929e72517fc04585b/80c60/boxGraphicFirstInstall.webp 1000w\", \"/static/097a1ef6118a773929e72517fc04585b/94b1e/boxGraphicFirstInstall.webp 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/webp\"\n  }), `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/097a1ef6118a773929e72517fc04585b/0eb09/boxGraphicFirstInstall.png 500w\", \"/static/097a1ef6118a773929e72517fc04585b/1263b/boxGraphicFirstInstall.png 1000w\", \"/static/097a1ef6118a773929e72517fc04585b/bbbf7/boxGraphicFirstInstall.png 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/png\"\n  }), `\n          `, mdx(\"img\", {\n    parentName: \"picture\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/097a1ef6118a773929e72517fc04585b/bbbf7/boxGraphicFirstInstall.png\",\n    \"alt\": \"After installing a Python package\",\n    \"title\": \"After installing a Python package\",\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  }), `\n        `), `\n    `)), mdx(\"p\", null, `This imaginary box is often called an “environment” in practice. If you open a terminal and type `, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, `python`), `, which will open up your Python interpreter, you will be able to access `, mdx(\"em\", {\n    parentName: \"p\"\n  }, `all`), ` packages that are inside this box. Even if you have 10000 packages inside this box, you will be able to use them all. Now, at first this might seem like a good idea. Obviously, if you work with multiple libraries or packages, you will want to use them all whenever you want to. There is just one small catch. Imagine you are working on multiple personal projects (you don’t have to work on them simultaneously). One project is centered around Web Development and you are using Django for this one. Another project lies in the realm of machine learning and you decided to give Scikit-Learn a try. So now your environment looks like this (I will leave out the dependencies of those packages to reduce clutter):`), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1280px\"\n    }\n  }, `\n      `, mdx(\"span\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.199999999999996%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAACEklEQVQoz5WRy4riUBCGfZWh36Gfp9/D3rhtsmtwI6iI6EKhDejGyyJe0JgbGkPUiCZR1BjjXWw5HWuoTHvpmdUc+JM6lb++k1PlAwBfIBD4FYlEnv1+/1MwGEwlEgnI5XKQSqUgHo9DOp0GmqYhGo1CLBaDcDjs5dH7+vr6hLXIQJYPH7VajV6tVmBZFnEcx91sNl/r9fofYf6q7Xb7hd7FYkHW6zUg4wbs9Xq4wUUA4PKfwhr4ZvwByrJM73Y7wNMsy7rM53NwHOcym80wB8vlEq4xar/fIwhc1724rusBO53OHchxHN3pdKDVahFRFKHZbIKqqsAwDEiSBIPBAMrlMsiy7Knf78M3EK5ARVHuQEEQaCyUJInUajUPpCgKlEol4HneA+TzeeA4DvBATdPgYXlAVVXvQJ7n6Xa7jRCCYCzEIvwrlmW9uFqtwvUbCoeIbZjP5wRbwjDMD+BHt9sF0zQ/TdMkaJpOp3h9Yts2GQ6HxDAMMpvNcKJEEARvP5lMiK7rnwiuVCofj8ACAsfjMUynUzwVJpMJNhoOhwMYhgGj0Qh0XYfz+ez1Eb04IPTZto03KdyAoVDoJZvNvguC8MayLFWv1ylRFKlMJkMVi0WK53mq2WxSHMdRhUKBommakiSJajQaFMuybzzPvyeTyZcbsF6v+1arlRc/arFY+E6n04/c8Xj08n97NU3z3r8BdhTdeYG7XooAAAAASUVORK5CYII=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), `\n  `, mdx(\"picture\", {\n    parentName: \"span\"\n  }, `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/4d534d97d62f4ce6121be70c0815db5e/601b1/boxGraphicWithPackages.webp 500w\", \"/static/4d534d97d62f4ce6121be70c0815db5e/80c60/boxGraphicWithPackages.webp 1000w\", \"/static/4d534d97d62f4ce6121be70c0815db5e/94b1e/boxGraphicWithPackages.webp 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/webp\"\n  }), `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/4d534d97d62f4ce6121be70c0815db5e/0eb09/boxGraphicWithPackages.png 500w\", \"/static/4d534d97d62f4ce6121be70c0815db5e/1263b/boxGraphicWithPackages.png 1000w\", \"/static/4d534d97d62f4ce6121be70c0815db5e/bbbf7/boxGraphicWithPackages.png 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/png\"\n  }), `\n          `, mdx(\"img\", {\n    parentName: \"picture\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/4d534d97d62f4ce6121be70c0815db5e/bbbf7/boxGraphicWithPackages.png\",\n    \"alt\": \"After installing many Python packages\",\n    \"title\": \"After installing many Python packages\",\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  }), `\n        `), `\n    `)), mdx(\"h2\", {\n    \"id\": \"what-are-virtual-environments-and-why-should-i-care\"\n  }, `What are virtual environments and why should I care?`), mdx(\"p\", null, `It is very likely that you won’t actually need to use all of your machine learning packages\nfor you web development project and your web development packages for your machine learning\nproject. So one idea would be to create two new “boxes” or environments that you can access\nseparately. Then your environments would look like this:`), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1280px\"\n    }\n  }, `\n      `, mdx(\"span\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.199999999999996%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB3ElEQVQoz11S2Y6qUBDk//9gnuZ+gCZqNC7gvkXFJQYUl8SI4gIuYMQdelI9FzMzJ6nQNN3V1cURZFn+lCTpMxaL/QuFQh+iKA5FUaRCoUClUokSiQRlMhnKZrMUj8cJ39LpNCWTSTyH4XD4A73gAJdwv99pMpmQaZq02WwYtm17qqr6iqL4tm37lmX5pmn6juP4w+GQ4TiOt91uCbAsiznAJbiu+zQM40lEATwiQoGPor8HOU3T/P+vXtCn6/oTXMLlcqHBYEDH45EnQanjOCTLMgMx8kCQH41G32yex8DRdZ3AJZzPZ2q1WjSfz7lQVVUyDIMqlQp7CAuQA0AqSRILwHm9Xm9C9LuuyytTLpejXq9H1WqVSTRNo1QqxUBcLpcpn8/TeDymSCTyVvjzLJfLb0IorNVqNJvNqN/vU7fbZfnFYpH/KDzDmhg2nU4pGo1Ss9mk0+n0tuJwOPAGvPL1eqV2u82SQQqy1WrFK6NxsViwMpDBXyjF2vAcqtbrNe33exbCCm+3G3U6nV9keNbrdR4CJVCO1R+PB/sHK0ACfzEQwHAmDO7hbrfjO4UiFIMEviIPFVCDuNFoMFCDPADliqIQtuWV8RF/FuoAxGgGEAeNiFEb1P/Ng/ALDl4Xuqn+5a0AAAAASUVORK5CYII=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), `\n  `, mdx(\"picture\", {\n    parentName: \"span\"\n  }, `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/45af6f0b6adb1bea0ee6d3643981836d/601b1/boxGraphicWithEnvironments.webp 500w\", \"/static/45af6f0b6adb1bea0ee6d3643981836d/80c60/boxGraphicWithEnvironments.webp 1000w\", \"/static/45af6f0b6adb1bea0ee6d3643981836d/94b1e/boxGraphicWithEnvironments.webp 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/webp\"\n  }), `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/45af6f0b6adb1bea0ee6d3643981836d/0eb09/boxGraphicWithEnvironments.png 500w\", \"/static/45af6f0b6adb1bea0ee6d3643981836d/1263b/boxGraphicWithEnvironments.png 1000w\", \"/static/45af6f0b6adb1bea0ee6d3643981836d/bbbf7/boxGraphicWithEnvironments.png 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/png\"\n  }), `\n          `, mdx(\"img\", {\n    parentName: \"picture\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/45af6f0b6adb1bea0ee6d3643981836d/bbbf7/boxGraphicWithEnvironments.png\",\n    \"alt\": \"After using virtual environments to separate package themes\",\n    \"title\": \"After using virtual environments to separate package themes\",\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  }), `\n        `), `\n    `)), mdx(\"p\", null, `This looks a look neater! With virtual environments, you can choose which environment you want to use and you don’t have to always load every single package that is installed on your system.`), mdx(\"p\", null, `Now I hear what you’re probably thinking, “Boris, I don’t do web development, I just want to do machine learning. Why should I use these environments?“. And that is a valid question!\nSo let’s take a look at another useful application of virtual environments.`), mdx(\"p\", null, `Imagine you are programming along with TensorFlow in August 2019, just minding your business, and\nthen, in September 2019, TensorFlow 2.0 comes out. It has lots of cool new features, is much\neasier to use and everyone is talking about it. Now you have a choice to make. Do you continue developing using the now legacy TensorFlow 1.0 or do you migrate your entire codebase to 2.0, even though it is still fresh and untested? Well, why not do both? If you create one virtual environment where you have your old TensorFlow 1 installation, and a new one with TensorFlow 2, you can start\ntesting out all of the cool new features without completely breaking your project. Your virtual environments may look like this:`), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1280px\"\n    }\n  }, `\n      `, mdx(\"span\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"56.199999999999996%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAABzElEQVQoz22S6YrqQBCFff83mF9zH0B/KC5o4oIiikZcY1xwi8YtLgkYRTSeyylvLoNM4JDq7qqvlu6Qpmnfqqp+x2KxP+Fw+EtRFENRFBQKBZRKJSQSCXCdzWYRj8ehqirS6TRSqRT/RiQS+WIsGWSF7vc7xuMx9vs9ttutyHEcX9f1F+U4zsu2bZHrui/DMESu6/q73Q6UbdvCICvked7DsqwHgEA+ADq86PT5cW8wGLz+Lf0gzjTNB1mh6/WKfr+P8/ksmVip67rQNA2NRkPsz/3hcPim+b6In2maICt0uVxQr9exWCzEUdd1rNdrFItF5PN5WJaFbrcrZ7TL5TIMwxDI8/n8D2S853nSMnK5HFqtljgTxOBkMoloNIperyfgarXKVpHJZPDbKFar1RvICgmaTqdot9sCZvmE8DZpswNWPp/PJSHXwSio0+kk59Ly7XZDs9mUNhk8mUzk5iqViog225nNZhLM5ExGCEew2WxwPB6FIRUSyFYIZAXL5VKeDufW6XQkgHsUA3kpHNHhcBC/4KxWq72BfDuj0Uiy04EVMZAwQmn/3OdIGEybySi+AM6axUmFPGT5rJKizQqoz336Bv4BMNgn8C+NQRj4ciaNRQAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), `\n  `, mdx(\"picture\", {\n    parentName: \"span\"\n  }, `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/a0d3197183abf3cea6ec2e3df9b2e8ed/601b1/boxGraphicWithVersions.webp 500w\", \"/static/a0d3197183abf3cea6ec2e3df9b2e8ed/80c60/boxGraphicWithVersions.webp 1000w\", \"/static/a0d3197183abf3cea6ec2e3df9b2e8ed/94b1e/boxGraphicWithVersions.webp 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/webp\"\n  }), `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/a0d3197183abf3cea6ec2e3df9b2e8ed/0eb09/boxGraphicWithVersions.png 500w\", \"/static/a0d3197183abf3cea6ec2e3df9b2e8ed/1263b/boxGraphicWithVersions.png 1000w\", \"/static/a0d3197183abf3cea6ec2e3df9b2e8ed/bbbf7/boxGraphicWithVersions.png 1280w\"],\n    \"sizes\": \"(max-width: 1280px) 100vw, 1280px\",\n    \"type\": \"image/png\"\n  }), `\n          `, mdx(\"img\", {\n    parentName: \"picture\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/a0d3197183abf3cea6ec2e3df9b2e8ed/bbbf7/boxGraphicWithVersions.png\",\n    \"alt\": \"After using virtual environments to separate versions\",\n    \"title\": \"After using virtual environments to separate versions\",\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  }), `\n        `), `\n    `)), mdx(\"p\", null, `This preserves both of your applications and smoothens out the transition to the newer version.\nI think this is a pretty neat thing to do as it can save you a good amount of time and stress because you do not have to worry about your project breaking once you update a critical package or dependency.\nNow you might still say, “Boris, I always use the latest packages, I don’t work with legacy code and I only do machine learning. Should I still use virtual environments?“. And to that, I say: yes!\nWhy? There are two more reasons why you should use virtual environments.`), mdx(\"p\", null, `The first reason is that you are creating a good habit for yourself. If you are using virtual environments now, it will feel a lot more natural to you in the future and you will be more comfortable with environments once you will really need them. Ok, that is an a-okay-reason.\nBut there is one more reason which was also the reason why I started using virtual environments.`), mdx(\"p\", null, `Imagine you have just finished your awesome new project, and you are ready to share it with the world.\nYou upload your code to GitHub, make a neat description and post about it on social media. To your\nsurprise, people are actually pretty interested in your project. It does not take long until someone\nwants to run your project on their own computer. So they ask you: “Can you give me a list of dependencies I need to install to be able to run your program?“. Uh-Oh.\nIf you did not use virtual environments and you have at least a single package that is not\nnecessary to run your project, if you just give them your entire list of global packages, there\nwill be way too much junk that they do not actually need. Now you could manually write down\nevery package that you used. Or you could create a Docker-container (If you do not know what those are, do not worry, just read along) and run your program inside of it.\nBut either way, it would be a lot cleaner if the person interested in your project or your\nDocker-container knew only those packages that are really necessary. `), mdx(\"p\", null, `So, in order to make the user and your container happy, use virtual environments. Not just\nfor your own good, but for the good of other people (and other containers). That way,\nyou can just create a simple “requirements.txt” or “environment.yaml” (for conda) and\neveryone will know what they have to install.`), mdx(\"p\", null, `If you are still not convinced to use virtual environments or you think that I missed some\ncrucial argument for using virtual environments, please let me know in the comments below!\nI would love to hear your opinion on this!`), mdx(\"p\", null, `Now that you are hopefully convinced that virtual environments are a good thing, let’s take a look at how you can use them. It’s not as difficult as you might expect, let’s take a look!`), mdx(\"h2\", {\n    \"id\": \"how-can-i-use-virtual-environments\"\n  }, `How can I use virtual environments?`), mdx(HelpfulTip, {\n    mdxType: \"HelpfulTip\"\n  }, \"If you know up front that you need or have to use Anaconda to manage your virtual environments, I recommend reading \", mdx(\"a\", {\n    rel: \"noopener noreferrer nofollow\",\n    href: \"/development_environment/anaconda\"\n  }, \"The Only Post you need to Start Using Anaconda\"), \" where I tell you everything you need to know and a little bit more about Anaconda and conda, it's package manager. After reading that article, you will be more than ready to use conda environments to their full potential.\"), mdx(\"p\", null, `There are many different utilities out there that allow you to integrate virtual environments into your workflow. Some of the names you might see on the web include “venv”, “virtualenv”, “pyenv”, “pipenv” or “conda”. So which one should you choose? Well, they all basically accomplish the same thing.\nSince Python version 3.5, the docs officially recommend venv for managing environments (See `, mdx(\"a\", {\n    rel: \"noopener noreferrer nofollow\",\n    target: \"_blank\",\n    href: \"https://docs.python.org/3/library/venv.html\"\n  }, `here`), `). Another benefit of venv is that it comes preinstalled with since Python 3.3. This means that you can just start using venv and not worry about which utility you should use.`), mdx(\"p\", null, `One small downside of venv is that you can not specify a different Python-version than the one you have on your system to create a new environment. So if you have Python 3.7 installed, but want to create a Python 2.7 environment, venv won’t be able to do this. If this is a feature you need, I would recommend using virtualenv or conda instead.`), mdx(\"p\", null, `With that being said, let’s take a look at how to actually use venv.`), mdx(\"h3\", {\n    \"id\": \"creating-and-deleting-environments\"\n  }, `Creating and deleting environments`), mdx(\"p\", null, `To create a new environment you can just type`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `python -m venv myEnv # on Windows (or if you have Python 2.x installed)\npython3 -m venv myEnv # on Mac and Linux\n`)), mdx(\"p\", null, `This will create a new folder in your current directory titled myEnv, where all of the information for your environment will be stored. If you want to move your environment to a different location, you can just move this folder. If you want to remove an environment, you can delete the folder.`), mdx(\"h3\", {\n    \"id\": \"activating-and-deactivating-environments\"\n  }, `Activating and deactivating environments`), mdx(\"p\", null, `To activate an environment you can type`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `.\\\\myEnv\\\\Scripts\\\\activate # on WIndows\n./myEnv/bin/activate  # on Mac and Linux\n`)), mdx(\"p\", null, `This will execute the activate-script inside of your environment-directory and start your virtual environment. After this command, you should see the name of your environment wrapped in brackets at the start of your prompt, like this:`), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"506px\"\n    }\n  }, `\n      `, mdx(\"span\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"9%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAj0lEQVQI1x1MzQqCQBhccrsGFVJCZQlh0KF/TTQXNqGCJHqASFFcLd//OuJ3GGaYP8blHTx8gHsxOtsXbFlDP6UY7BOMnAzmRRHGboZVVGMWKJiBwtQvsJR/LEQFO/rBEiX1Wfd6g+Y9oTkx2PpNZn/3RW/zIW7P2vHwkJCe+AWMcw79mMISFWWGm2MeluQ1/fZDYuNsanMAAAAASUVORK5CYII=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), `\n  `, mdx(\"picture\", {\n    parentName: \"span\"\n  }, `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/36c1e2ecdd436ea835f0358e800b718d/601b1/VenvPrompt.webp 500w\", \"/static/36c1e2ecdd436ea835f0358e800b718d/2b870/VenvPrompt.webp 506w\"],\n    \"sizes\": \"(max-width: 506px) 100vw, 506px\",\n    \"type\": \"image/webp\"\n  }), `\n          `, mdx(\"source\", {\n    parentName: \"picture\",\n    \"srcSet\": [\"/static/36c1e2ecdd436ea835f0358e800b718d/0eb09/VenvPrompt.png 500w\", \"/static/36c1e2ecdd436ea835f0358e800b718d/61db1/VenvPrompt.png 506w\"],\n    \"sizes\": \"(max-width: 506px) 100vw, 506px\",\n    \"type\": \"image/png\"\n  }), `\n          `, mdx(\"img\", {\n    parentName: \"picture\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"src\": \"/static/36c1e2ecdd436ea835f0358e800b718d/61db1/VenvPrompt.png\",\n    \"alt\": \"Virtual Environment name in prompt\",\n    \"title\": \"Virtual Environment name in prompt\",\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    }\n  }), `\n        `), `\n    `)), mdx(\"p\", null, `To deactivate an environment, you can just run`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `deactivate\n`)), mdx(\"h3\", {\n    \"id\": \"inspecting-your-environment\"\n  }, `Inspecting your environment`), mdx(\"p\", null, `You can view a list of all of your installed packages by running:`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `pip list\n`)), mdx(\"p\", null, `If you want each package-version to be output alongside the package names,\nyou can run`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `pip freeze\n`)), mdx(\"p\", null, `instead.`), mdx(\"h3\", {\n    \"id\": \"options-for-creating-new-environments\"\n  }, `Options for creating new environments`), mdx(\"h4\", {\n    \"id\": \"initializing-from-a-text-file\"\n  }, `Initializing from a text file`), mdx(\"p\", null, `You can also create a new environment based on a text file. If you find\na file named “requirements.txt” in a GitHub-repo or something similar,\nyou can create a new environment\nwith all of the dependencies that are listed in that file by running`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `pip install -r requirements.txt\n`)), mdx(\"p\", null, `If you are interested in creating such a file yourself, you can do so by running`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `pip freeze > requirements.txt\n`)), mdx(\"p\", null, `This will run pip freeze and save the output in a file called “requirements.txt”, which is exactly\nwhat we want. Alternatively, you can create such a file yourself and just copy-paste the output of pip freeze into that file.`), mdx(\"h4\", {\n    \"id\": \"initializing-with-global-packages-available\"\n  }, `Initializing with global packages available`), mdx(\"p\", null, `If you want to create a new environment, but still have access to all of your globally installed packages, you could either create a requirements.txt-file by following the previous step and then installing it with pip install -r, or you could use the following command instead:`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `python -m venv myEnv --system-site-packages # on Windows (or if you have Python 2.x installed)\npython3 -m venv myEnv --system-site-packages # on Mac and Linux \n`)), mdx(\"p\", null, `This will allow you to use any globally installed packages in your myEnv-environment.\nIf you install a package globally after running this command, it `, mdx(\"em\", {\n    parentName: \"p\"\n  }, `will`), ` also be available in\nthe myEnv environment. Also, if you uninstall a package globally, that is not installed\nlocally in your myEnv-environment, it will also no longer be available in your\nmyEnv-environment. If this is `, mdx(\"em\", {\n    parentName: \"p\"\n  }, `not`), ` something you want, you should create a requirements.txt-file instead, since this way there will be no “automatic updates”\nSo this `, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, `--system-site-packages`), `-flag updates\nyour environment automatically if there are changes in your globally installed packages.\nUsing the requirements.txt-method only updates your package list once when you initialize\na new environment.\nWhen you install a package inside your myEnv-environment, it will not be available globally,\neven with the —system-site-packages-flag. So this “synchronization only works one way.`), mdx(\"p\", null, `If you initialized your environment with the `, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, `--system-site-packages`), `-flag and you want to\nview all of the packages that are only installed locally in your environment, i.e. the packages\nthat were not added because of the flag, you can run`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `pip freeze --local\n# or\npip list --local\n`)), mdx(\"h3\", {\n    \"id\": \"tips-and-best-practices\"\n  }, `Tips and best practices`), mdx(\"p\", null, `Often you will see people saving their virtual environments directly inside their\nproject directories. This is good because not only will you not have to remember or search\nfor your environment location (it will always be there where the project is), but if\nyou delete your project you will also delete your environment, which usually is desired.\nThese directories are often named “env, “virtualenv” or “venv” (the latter one is fitting if you are using the venv-package). Calling your environment “venv” is a good practice, because the command you have to run to activate your environment now is the same across all of your environments\n(`, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, `.\\\\venv\\\\Scripts\\\\activate`), `) and you also automatically know which tool you used to create your environments.`), mdx(\"p\", null, `One thing you have to pay attention to when you use this approach is that you should not\ncommit your environment to source control (i.e. git). Your environments can get quite large in size and they are not really relevant to your project or to other people, so you should list your\nenvironment in your .gitignore-file. If your environment is called “venv” you can just add the following line to your .gitignore-file:`), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, `venv/\n`)), mdx(\"p\", null, `Instead, it is better to commit a requirements.txt-file (or environment.yaml-file) to your repository.`), mdx(\"p\", null, `With this, you should now be ready to utilize venv to create and manage virtual environments!`), mdx(\"h2\", {\n    \"id\": \"further-reading\"\n  }, `Further Reading`), mdx(\"p\", null, `If you are interested in Data Science and Machine Learning, you might have heard the term “Anaconda”. If you are not sure whether you should use Anaconda, I recommend you read\n`, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"/development_environment/anaconda\"\n  }, `The Only Post You need to Start Using Anaconda`), `, where I show you everything you need to know and a bit more about Anaconda and whether it is right for you.`));\n}\n;\nMDXContent.isMDXComponent = true;","excerpt":"In this post, we will cover what package managers and virtual environments are, why you should use them and how you can do so. If you have heard of tools such as pip, virtualenv, venv,conda, or maybe even used them before, but you did not fully understand what was going on under the hood, this post is for you.","tableOfContents":{"items":[{"url":"#package-managers","title":"Package Managers"},{"url":"#what-are-virtual-environments-and-why-should-i-care","title":"What are virtual environments and why should I care?"},{"url":"#how-can-i-use-virtual-environments","title":"How can I use virtual environments?","items":[{"url":"#creating-and-deleting-environments","title":"Creating and deleting environments"},{"url":"#activating-and-deactivating-environments","title":"Activating and deactivating environments"},{"url":"#inspecting-your-environment","title":"Inspecting your environment"},{"url":"#options-for-creating-new-environments","title":"Options for creating new environments","items":[{"url":"#initializing-from-a-text-file","title":"Initializing from a text file"},{"url":"#initializing-with-global-packages-available","title":"Initializing with global packages available"}]},{"url":"#tips-and-best-practices","title":"Tips and best practices"}]},{"url":"#further-reading","title":"Further Reading"}]},"frontmatter":{"title":"Package Managers and Virtual Environments Explained, Step by Step","userDate":"22 January 2021","date":"2021-01-22T19:44:03.128Z","dateModified":"2021-01-22T19:44:03.128Z","changelog":[],"tags":["Development Environment"],"timeToRead":10,"excerpt":"In this post, we will cover what package managers and virtual environments are, why you should use them and how you can do so. If you have heard of tools such as pip, virtualenv, venv,conda, or maybe even used them before, but you did not fully understand what was going on under the hood, this post is for you.","image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAC4jAAAuIwF4pT92AAACU0lEQVQozx3LSXPSYACA4Rx1dAqEhNaKEEoxbCHNQvYvCSH7boCwNAVKW1vt1NoZb171fzv19j6HFyLEWNBS2ZjJxhcR+IwSAyOTJ6moxZKesmoi6ImkJ6q54LSM4EPJyAVjAZwNp80ggndf5+lcnKQ983KgzSi7oKc5ay0pIyelgNMSeToDVs6BON6/7L4/zYundPPIKDE0oFSaUUQ9oUCCGIeycYvaD1V9d+Q+V4IXfGzL07li5cBajgXz95+/D493/vw+nB0IgoeaHeqCUYe8t776+vPH83qz26y3N7cPd0+/8uLgRflYy/hJJluL0djASVX3CsleMSAeXMhQCcHQer/ek0kQWcnGChaymWSr/Wr/TbMzQQ9IOeoKQV8Muqw7YO351bPsFG3K6XI+VK61SwhWqZ0h9SE2VGsdaRosDX9R60jnlNmhLVIM+5zXZZ2R4pNTnzC8/sQeABfnXKhSa1dP2sjxGYxijdYQmFG23Nphziouo4ZDwWUVnwceK3qTbK4eAmGvivc6uHUJ0YHg43PkpI3UexUUa7b6RbF1HT/L8sP1jeUvcMakRJeRPR74tORRSuiGazO8VO0VrQRQGcHgar3MpUf87D3pvqGTt3T07sJHJteIvq1ODx/AsstaA97rjBRSdNLlwYwKVvZwQoBqZxSCy5UmWWqM4OaogpFIm4EbRBmjys3X7ot+l7Nw1hrxlmLPgJNLTm54easvQHXaPRci9BQvwZ9gFCtXGzDShNEWjDar/3ly2vn4me1xNqunZnRpZjd6utfjXYsy/wHl5pp0adQ/agAAAABJRU5ErkJggg=="},"images":{"fallback":{"src":"/static/2808baf1ca8b1f9b0a5c234efae604d1/87706/PackagesThumbnail.png","srcSet":"/static/2808baf1ca8b1f9b0a5c234efae604d1/0dee1/PackagesThumbnail.png 750w,\n/static/2808baf1ca8b1f9b0a5c234efae604d1/8beaa/PackagesThumbnail.png 1080w,\n/static/2808baf1ca8b1f9b0a5c234efae604d1/87706/PackagesThumbnail.png 1280w","sizes":"100vw"},"sources":[{"srcSet":"/static/2808baf1ca8b1f9b0a5c234efae604d1/a66aa/PackagesThumbnail.webp 750w,\n/static/2808baf1ca8b1f9b0a5c234efae604d1/65dd5/PackagesThumbnail.webp 1080w,\n/static/2808baf1ca8b1f9b0a5c234efae604d1/71d4d/PackagesThumbnail.webp 1280w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.5625}}},"author":[{"id":"Boris Giba","bio":"Hi! I'm Boris and I run this website. You can find more information in the \"About\"-tab.","avatar":{"children":[{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAQFBv/EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/aAAwDAQACEAMQAAAB25bcya1Bcz84HRg//8QAGxAAAwACAwAAAAAAAAAAAAAAAQIDABESMTP/2gAIAQEAAQUCo3FFo4OEbG1R8u5SXZh4f//EABURAQEAAAAAAAAAAAAAAAAAAAEg/9oACAEDAQE/ASP/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAeEAABBAEFAAAAAAAAAAAAAAABAAIQETESIUFRcf/aAAgBAQAGPwIkZTQ/Sb6ilvxBIzDPF//EABoQAQACAwEAAAAAAAAAAAAAAAERIQAQMUH/2gAIAQEAAT8hQ1PjHRkxa9E644V8JdD3BEk1JiRlbnUf/9oADAMBAAIAAwAAABADAID/xAAWEQEBAQAAAAAAAAAAAAAAAAABESD/2gAIAQMBAT8QAjcf/8QAFhEBAQEAAAAAAAAAAAAAAAAAARAR/9oACAECAQE/EFdIT//EAB4QAQACAQQDAAAAAAAAAAAAAAERIQAQMUFRYYGx/9oACAEBAAE/EClkAFglYJ8Xl1kNwXZjrQ1xCEcPBl8E6A89+sAII7JzjXgEBSYlyYrZm+d/uVsWluf/2Q==","aspectRatio":1,"src":"/static/ba9e631272af1b925d6491b30df3b36f/2f1b1/boris.jpg","srcSet":"/static/ba9e631272af1b925d6491b30df3b36f/b3d27/boris.jpg 40w,\n/static/ba9e631272af1b925d6491b30df3b36f/5a735/boris.jpg 80w,\n/static/ba9e631272af1b925d6491b30df3b36f/6e81a/boris.jpg 120w,\n/static/ba9e631272af1b925d6491b30df3b36f/2f1b1/boris.jpg 800w,\n/static/ba9e631272af1b925d6491b30df3b36f/97bce/boris.jpg 1878w","sizes":"(max-width: 800px) 100vw, 800px"}}]}}],"imgCaption":"Background image by Ciprian Boiciuc","imgSource":"https://unsplash.com/photos/CXdeJI3bD2U","uniquePostId":1,"tutorialId":null,"tutorialEntryIdx":null,"dependencies":["Python"],"proficiencyLevel":"Beginner"}},"relatedPosts":{"totalCount":3,"edges":[{"node":{"id":"9a20e942-2783-5955-a0a9-a9a97e937fa2","excerpt":"In this article you will learn what Jupyter and Jupyter Notebooks are, when to use them and how to use them. You will learn about the most common shortcuts, Jupyter Lab, as well as magic commands.","frontmatter":{"title":"The Only Post you Need to Start Using Jupyter","timeToRead":11,"date":"2021-02-20T17:13:56.071Z"},"fields":{"slug":"/development_environment/jupyter/"}}},{"node":{"id":"ff5a26d8-f48b-5d71-aa50-1d6b1dcfb60c","excerpt":"In this article, you will learn what Anaconda and conda are, when to use them and how to use them. I will cover the pros and cons of Anaconda, installation on Windows, Mac, and Linux, as well as using conda to install packages and manage virtual environments and manage channels.","frontmatter":{"title":"The Only Post you Need to Start Using Anaconda","timeToRead":15,"date":"2021-02-05T18:15:52.584Z"},"fields":{"slug":"/development_environment/anaconda/"}}},{"node":{"id":"29c967bc-f331-5748-9e28-3b2f8edc1e59","excerpt":"In this post, we will cover what package managers and virtual environments are, why you should use them and how you can do so. If you have heard of tools such as pip, virtualenv, venv,conda, or maybe even used them before, but you did not fully understand what was going on under the hood, this post is for you.","frontmatter":{"title":"Package Managers and Virtual Environments Explained, Step by Step","timeToRead":10,"date":"2021-01-22T19:44:03.128Z"},"fields":{"slug":"/development_environment/packages_and_environments/"}}}]}},"pageContext":{"slug":"/development_environment/packages_and_environments/","prev":null,"next":{"excerpt":"In this article, you will learn what Anaconda and conda are, when to use them and how to use them. I will cover the pros and cons of Anaconda, installation on Windows, Mac, and Linux, as well as using conda to install packages and manage virtual environments and manage channels.","frontmatter":{"title":"The Only Post you Need to Start Using Anaconda","tags":["Development Environment"],"date":"2021-02-05T18:15:52.584Z","dateModified":"2021-02-05T18:15:52.584Z","changelog":[],"draft":false,"excerpt":"In this article, you will learn what Anaconda and conda are, when to use them and how to use them. I will cover the pros and cons of Anaconda, installation on Windows, Mac, and Linux, as well as using conda to install packages and manage virtual environments and manage channels.","uniquePostId":2,"timeToRead":15,"tutorialId":null,"tutorialEntryIdx":null,"dependencies":[],"proficiencyLevel":"Beginner","image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAC4jAAAuIwF4pT92AAACbklEQVQozxXPaU/aAADG8SZLFt2kSEGw9JJRKG2h911oixyKrqBGp05j5jE30SkwBEXHNM7pNpcle7Ovu5A8b3/J8wewNINRoyFk5ufT0+237+1u7/i0Nfhy0/zUPj7rXFwNu73r/uXw7v7h682dapZggiVSAk7yAEaxI5nKkDlhaX1jZX2zVl/7eNI5bJ4trWzV/a3Vtd1CafHN5u7G9t5puy9qxfhMLpkWWVoBongKoxgiw6JpGk1nM4JLSw4jahlTQGyaPuFgg4YJjswprJyneIWRjJzqcJxJpQUgAKHQdAJ+Rc2wvGQ61mzBKupSSZa2NcbVqWXJ/WerjbxoFsz5uuaVOMMS7FlaySdZDQDDWABCg2FsGqOysmiWBJLhMg25vOc//ngadO7K/ap2rivanFld1IplMe/weSNnGoLhjTAYwULRBBRNxBCSoJgkK6hvTW9/btC/PTpo1R7mra5rOb5RqapFV3RtwVFzlkax4ggHITw0hUdgAoqi42AkTiQzsqCf60pfFnq8+VszX1eMclEu5kVPFwp61tAYVc5k5VEzGB3dnpxCYZw08sUAFB+biITwOLcjLN/6hYZDqyxj04qnSa5Ma1xK4HjF0mULIHJMyuIieOL5i1h9ZaPXv7wYXB2dnH7u9nXF+/Pr7/Vw2L7ovG8e3j88VvwlCKcISk5lNZnTAYRPZW01AifHg7Co2DvvDhb8Zb+x2up0BdW2vQonWfuHx7sfmketrrvQoFRTLpRJ3iQoCQhGUTCKgCEsFCPAMBKAkHFweiwQezY29XISeTkJgxF8AkLCaFJyanrFt6o1ilMTjCo63n9Fu5ZcMqvRBgAAAABJRU5ErkJggg=="},"images":{"fallback":{"src":"/static/f5a4fcd99a9e6fb285df56190a604a31/87706/Anaconda_Thumbnail.png","srcSet":"/static/f5a4fcd99a9e6fb285df56190a604a31/0dee1/Anaconda_Thumbnail.png 750w,\n/static/f5a4fcd99a9e6fb285df56190a604a31/8beaa/Anaconda_Thumbnail.png 1080w,\n/static/f5a4fcd99a9e6fb285df56190a604a31/87706/Anaconda_Thumbnail.png 1280w","sizes":"100vw"},"sources":[{"srcSet":"/static/f5a4fcd99a9e6fb285df56190a604a31/a66aa/Anaconda_Thumbnail.webp 750w,\n/static/f5a4fcd99a9e6fb285df56190a604a31/65dd5/Anaconda_Thumbnail.webp 1080w,\n/static/f5a4fcd99a9e6fb285df56190a604a31/71d4d/Anaconda_Thumbnail.webp 1280w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.5625}}},"author":[{"id":"Boris Giba","bio":"Hi! I'm Boris and I run this website. You can find more information in the \"About\"-tab.","avatar":{"children":[{"fluid":{"aspectRatio":1,"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAQFBv/EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/aAAwDAQACEAMQAAAB25bcya1Bcz84HRg//8QAGxAAAwACAwAAAAAAAAAAAAAAAQIDABESMTP/2gAIAQEAAQUCo3FFo4OEbG1R8u5SXZh4f//EABURAQEAAAAAAAAAAAAAAAAAAAEg/9oACAEDAQE/ASP/xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AR//xAAeEAABBAEFAAAAAAAAAAAAAAABAAIQETESIUFRcf/aAAgBAQAGPwIkZTQ/Sb6ilvxBIzDPF//EABoQAQACAwEAAAAAAAAAAAAAAAERIQAQMUH/2gAIAQEAAT8hQ1PjHRkxa9E644V8JdD3BEk1JiRlbnUf/9oADAMBAAIAAwAAABADAID/xAAWEQEBAQAAAAAAAAAAAAAAAAABESD/2gAIAQMBAT8QAjcf/8QAFhEBAQEAAAAAAAAAAAAAAAAAARAR/9oACAECAQE/EFdIT//EAB4QAQACAQQDAAAAAAAAAAAAAAERIQAQMUFRYYGx/9oACAEBAAE/EClkAFglYJ8Xl1kNwXZjrQ1xCEcPBl8E6A89+sAII7JzjXgEBSYlyYrZm+d/uVsWluf/2Q==","sizes":"(max-width: 800px) 100vw, 800px","src":"/static/ba9e631272af1b925d6491b30df3b36f/2f1b1/boris.jpg","srcSet":"/static/ba9e631272af1b925d6491b30df3b36f/fd013/boris.jpg 200w,\n/static/ba9e631272af1b925d6491b30df3b36f/25252/boris.jpg 400w,\n/static/ba9e631272af1b925d6491b30df3b36f/2f1b1/boris.jpg 800w,\n/static/ba9e631272af1b925d6491b30df3b36f/0ff54/boris.jpg 1200w,\n/static/ba9e631272af1b925d6491b30df3b36f/06655/boris.jpg 1600w,\n/static/ba9e631272af1b925d6491b30df3b36f/97bce/boris.jpg 1878w"}}]}}]},"fields":{"layout":"post","slug":"/development_environment/anaconda/"}},"primaryTag":"Development Environment"}},"staticQueryHashes":["13077718","1316742457","1394499604","2907728042","3762220167"]}