- 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.
推薦閱讀
- Hands-On Internet of Things with MQTT
- Machine Learning for Cybersecurity Cookbook
- Excel 2007函數與公式自學寶典
- 計算機原理
- 電腦上網直通車
- 完全掌握AutoCAD 2008中文版:綜合篇
- 運動控制器與交流伺服系統的調試和應用
- 網絡綜合布線設計與施工技術
- Linux:Powerful Server Administration
- 工業控制系統測試與評價技術
- 單片機C語言應用100例
- 突破,Objective-C開發速學手冊
- 基于Xilinx ISE的FPAG/CPLD設計與應用
- 多媒體制作與應用
- PowerMill 2020五軸數控加工編程應用實例