- Hands-On Artificial Intelligence on Amazon Web Services
- Subhashini Tripuraneni Charles Song
- 230字
- 2021-06-24 12:48:45
Setting up a Python virtual environment with Pipenv
We will use a Python virtual environment to manage the packages for the projects in this book. A virtual environment is a Pythonic way to create a self-contained project directory tree that includes a particular combination of a Python version and packages that are specific to a project.
There are many benefits of using Python virtual environments:
- Since all of the packages and dependencies of a project are specified in a configuration file, the project's development environment can be easily duplicated by other developers; this is very useful when you are working within a development team.
- Even if you are working by yourself, having a virtual environment will help you with creating (and recreating) the environment on one or more computers for development, testing, and deployment.
- A virtual environment also allows you to create separate Python environments, where parallel copies of Python dependencies can be installed. This way, we can keep conflicting Python versions and packages for different projects on the same computer.
Pipenv is the new kid on the block when it comes to Python virtual environments, but it has already been promoted as the officially recommended Python packaging tool from python.org. To install pipenv, we will use Pip, the Python package management tool:
$ pip install pipenv
$ pipenv --version
This command will help you install and verify pipenv.
推薦閱讀
- 現(xiàn)代測控系統(tǒng)典型應(yīng)用實(shí)例
- 火格局的時空變異及其在電網(wǎng)防火中的應(yīng)用
- 機(jī)器學(xué)習(xí)與大數(shù)據(jù)技術(shù)
- 讓每張照片都成為佳作的Photoshop后期技法
- 西門子S7-200 SMART PLC實(shí)例指導(dǎo)學(xué)與用
- Apache Spark Deep Learning Cookbook
- Embedded Programming with Modern C++ Cookbook
- 具比例時滯遞歸神經(jīng)網(wǎng)絡(luò)的穩(wěn)定性及其仿真與應(yīng)用
- Lightning Fast Animation in Element 3D
- Ruby on Rails敏捷開發(fā)最佳實(shí)踐
- Applied Data Visualization with R and ggplot2
- Citrix? XenDesktop? 7 Cookbook
- Linux Shell編程從初學(xué)到精通
- 嵌入式GUI開發(fā)設(shè)計
- ZigBee無線通信技術(shù)應(yīng)用開發(fā)