官术网_书友最值得收藏!

Understanding the directory structure for a virtual environment

The specified target folder has a new directory tree that contains Python executable files and other files that indicate it is a PEP405 virtual environment.

In the root directory for the virtual environment, the pyenv.cfg configuration file specifies different options for the virtual environment and its existence is an indicator that we are in the root folder for a virtual environment. In Linux and macOS, the folder will have the following main subfolders: bin, include, lib, lib/python3.6, and lib/python3.6/site-packages. In Windows, the folder will have the following main subfolders: Include, Lib, Lib\site-packages, and Scripts. The directory trees for the virtual environment in each platform are the same as the layout of the Python installation on these platforms.

The following diagram shows the folders and files in the directory trees generated for the 01 virtual environments in macOS and Linux platforms:

The following diagram shows the main folders in the directory trees generated for the virtual environment in Windows:

After we activate the virtual environment, we will install third-party packages into the virtual environment and the modules will be located in the lib/python3.6/site-packages or Lib\site-packages folder, based on the platform. The executables will be copied in the bin or Scripts folder, based on the platform. The packages we install won't make changes to other virtual environments or our base Python environment.
主站蜘蛛池模板: 巩留县| 石狮市| 武义县| 砚山县| 南昌县| 四子王旗| 含山县| 临潭县| 永安市| 寻甸| 庆元县| 台安县| 舟曲县| 芦溪县| 太和县| 迁西县| 肇东市| 郎溪县| 宁夏| 商洛市| 鹰潭市| 岳阳市| 都匀市| 无锡市| 鄂伦春自治旗| 甘泉县| 龙川县| 南投县| 临漳县| 兴文县| 渑池县| 墨玉县| 鲜城| 金秀| 福贡县| 三明市| 宣恩县| 习水县| 庆云县| 石棉县| 宾阳县|