A few days ago written github file is deleted, re-write the next, where the backup next.
pyhon development environment configuration
- System Ubuntu 16.04
- Python 3.6 version
Relative to the system comes with Python, Anaconda to facilitate the management of different projects different, each environment can be a different development environment, eliminating the tedious and frequently set package management, project migration environment configuration problems when using the Anaconda need to know environmental management and package management. here are the official tutorial link , the following brief excerpt some of the content in Chinese.
Anaconda Environmental Management
conda version View
conda --version
更新 conda conda conda update
更新 loved loved conda update
Update python
conda update python
View environment has been created
conda env list
Creation Environment
conda create -n <env_name> python=x.x
xx specifies the version of Python, the name may be followed by the package automatically installs the specified development package when you create the environment.
After you create the environment, need to activate the development environment, after creating the end, the system will prompt corresponding activation command and closed environment, in general as follows,
conda activate <env_name> | source activate <env_name> | activate <env_name>
conda deactivate <env_name> | source deactivate <env_name> | activate <env_name>
Shared development environment, the network will provide teaching materials field .yml file sharing to complete development environment, follow the instructions of the appropriate command.
Copy Development Environment
conda create -n <env_source_name> --clone <env_clone_name>
Delete the environment
conda remove -n <env_name> --all
Anaconda package management
Installation by conda command
conda install <package_name> = xxx (xxx specified version may be the default)
View packages already installed
conda list
View a given environment installed packages
conda list -n <env_name>
Installation package to the specified environment
conda install -n <env_name> <package_name>
If you do not specify the name of the environment -n, were installed in the currently active environment
Update package
conda update -n <env_name> <package_name>
Delete package
conda remove -n <env_name> <package_name>
Update conda, keeping conda date
conda conda update
Some package can not be installed directly by conda install command, then you need to search for and follow the prompts to install. As follows,
anaconda search -t conda <package_name>
You can see the list given in the form of all the relevant library, pay attention to see supported Python versions and operating systems, in name, copy the contents to the following parameters in <>,
anaconda show <name_value>
At this version will give information package, pay attention to the last sentence, it will give the command to install, execute to install.