当前位置:网站首页>How to use Python 2.7 after installing anaconda3?
How to use Python 2.7 after installing anaconda3?
2020-11-06 01:28:00 【Elementary school students in IT field】
First, in the anaconda Download the corresponding version of anaconda3
install anaconda3
open anaconda3, Click on the left side of the interface Environments, Click on the Create The button will appear in the following window ,
To create Python Environment name and select version , Select and click Create To generate new Python Version environment , Here's the picture
stay anaconda3 Use different versions of Python:
1、 stay anaconda3 Use... In the graphical interface : Just click on the corresponding environment name , If necessary Python2.7 Next use , Click on py27 Then switch to Python2.7
2、 stay Mac Terminal use : The input terminal
source activate { Name of the environment }
Such as
source activate py27
You can switch the version to Python2.7, At this time, under the terminal pip and conda The orders are all right Python2.7 Version to operate ; If you want to go back to the default version ( The default version is 3.6), Input
source deactivate
that will do ( notes : stay Windows Under the system , The switching and closing of the environment is similar to the above , Just one less source command )
anaconda3 Next different version Python install TensorFlow:
because Mac Only support CPU Version of TensorFlow, Therefore, the installation is relatively simple , Switch to what you want to use Python edition , Input
pip install tensorflow
perhaps
conda install tensorflow
You can install TensorFlow
Copy 、 Move and delete
linux Copy the file below 、 The move and delete commands are :cp,mv,rm
One 、 File copy command cp
Command format :cp [-adfilprsu] Source file (source) Target file (destination)
cp [option] source1 source2 source3 … directory
Parameter description :
-a: Refer to archive It means , It also means copying all directories
-d: If the source file is a connection file (link file), Copy the connection file properties instead of the file itself
-f: mandatory (force), If there is any repetition or other question , Don't ask users , And forced copying
-i: If target file (destination) Already exists , When overriding, it will first ask if the operation is true
-l: Establish a hard connection (hard link) The connection file for , Instead of copying the file itself
-p: Copy with file properties , Instead of using default properties
-r: Recursive replication , For directory copy operations
-s: Copy as symbolic connection file (symbolic link), namely “ Shortcut ” file
-u: If the target file is older than the source file , Update target file
Such as the /test1 In the catalog file1 Copied to the /test3 Catalog , And change the file name to file2, You can enter the following command :
cp /test1/file1 /test3/file2
Two 、 File move command mv
Command format :mv [-fiv] source destination
Parameter description :
-f:force, Force to move directly without asking
-i: If target file (destination) Already exist , You will be asked if you want to overwrite
-u: If the target file already exists , And the source file is relatively new , Will update
Such as the /test1 In the catalog file1 Copied to the /test3 Catalog , And change the file name to file2, You can enter the following command :
mv /test1/file1 /test3/file2
Linux All files in the current directory are moved to the upper directory
mv * …/
3、 ... and 、 File delete command rm
Command format :rm [fir] File or directory
Parameter description :
-f: Mandatory deletion
-i: Interactive mode , Ask the user whether to operate before deleting
-r: Recursive delete , It is often used in the deletion of a directory
If you delete /test In the catalog file1 file , You can enter the following command :
rm -i /test/file1
There was a problem updating environment variables .bash_profile Cannot edit
If you're editing .bash_profile when , Prompt " You are not a document “.bash_profile” Owner , So you don't have permission to write to this file .", It can be solved by the following operations .
In the personal folder Directory , open Go2Shell, Input .bash_profile To open , When opened, a prompt will pop up , And there's a copy button , Click to make a copy , Finish editing .
Input... At the terminal cd ~, And then you type in ls -al, Then enter the command sudo mv bash_profile copy .txt .bash_profile Cover the contents of the document .
Input vim .bash_profile The contents of the file will be displayed , Make sure the configuration is correct , Enter... At the end :q Proceed to exit .
Input source .bash_profile updated ,
Reference link :https://www.jianshu.com/p/9bbb33072c3a
版权声明
本文为[Elementary school students in IT field]所创,转载请带上原文链接,感谢
边栏推荐
- Summary of common algorithms of linked list
- xmppmini 專案詳解:一步一步從原理跟我學實用 xmpp 技術開發 4.字串解碼祕笈與訊息包
- React design pattern: in depth understanding of react & Redux principle
- 6.2 handleradapter adapter processor (in-depth analysis of SSM and project practice)
- 熬夜总结了报表自动化、数据可视化和挖掘的要点,和你想的不一样
- 使用 Iceberg on Kubernetes 打造新一代云原生数据湖
- Python3 e-learning case 4: writing web proxy
- Multi classification of unbalanced text using AWS sagemaker blazingtext
- NLP model Bert: from introduction to mastery (2)
- Leetcode's ransom letter
猜你喜欢
Python download module to accelerate the implementation of recording
如何玩转sortablejs-vuedraggable实现表单嵌套拖拽功能
How do the general bottom buried points do?
PHPSHE 短信插件说明
CCR炒币机器人:“比特币”数字货币的大佬,你不得不了解的知识
加速「全民直播」洪流,如何攻克延时、卡顿、高并发难题?
数字城市响应相关国家政策大力发展数字孪生平台的建设
做外包真的很难,身为外包的我也无奈叹息。
The road of C + + Learning: from introduction to mastery
In order to save money, I learned PHP in one day!
随机推荐
6.1.2 handlermapping mapping processor (2) (in-depth analysis of SSM and project practice)
比特币一度突破14000美元,即将面临美国大选考验
采购供应商系统是什么?采购供应商管理平台解决方案
Multi classification of unbalanced text using AWS sagemaker blazingtext
Programmer introspection checklist
Leetcode's ransom letter
Natural language processing - wrong word recognition (based on Python) kenlm, pycorrector
Analysis of react high order components
Serilog原始碼解析——使用方法
Filecoin的经济模型与未来价值是如何支撑FIL币价格破千的
How long does it take you to work out an object-oriented programming interview question from Ali school?
The practice of the architecture of Internet public opinion system
vue任意关系组件通信与跨组件监听状态 vue-communication
ES6学习笔记(二):教你玩转类的继承和类的对象
Arrangement of basic knowledge points
How to select the evaluation index of classification model
Synchronous configuration from git to consult with git 2consul
加速「全民直播」洪流,如何攻克延时、卡顿、高并发难题?
High availability cluster deployment of jumpserver: (6) deployment of SSH agent module Koko and implementation of system service management
htmlcss