当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- What is the difference between data scientists and machine learning engineers? - kdnuggets
- 6.1.2 handlermapping mapping processor (2) (in-depth analysis of SSM and project practice)
- After reading this article, I understand a lot of webpack scaffolding
- Calculation script for time series data
- 使用 Iceberg on Kubernetes 打造新一代云原生数据湖
- ES6学习笔记(四):教你轻松搞懂ES6的新增语法
- 嘗試從零開始構建我的商城 (二) :使用JWT保護我們的資訊保安,完善Swagger配置
- Nodejs crawler captures ancient books and records, a total of 16000 pages, experience summary and project sharing
- 6.5 request to view name translator (in-depth analysis of SSM and project practice)
- 2019年的一个小目标,成为csdn的博客专家,纪念一下
猜你喜欢
vue-codemirror基本用法:实现搜索功能、代码折叠功能、获取编辑器值及时验证
EOS创始人BM: UE,UBI,URI有什么区别?
2019年的一个小目标,成为csdn的博客专家,纪念一下
Brief introduction of TF flags
Windows 10 tensorflow (2) regression analysis of principles, deep learning framework (gradient descent method to solve regression parameters)
一篇文章带你了解CSS3 背景知识
What is the side effect free method? How to name it? - Mario
Mongodb (from 0 to 1), 11 days mongodb primary to intermediate advanced secret
[JMeter] two ways to realize interface Association: regular representation extractor and JSON extractor
容联完成1.25亿美元F轮融资
随机推荐
深度揭祕垃圾回收底層,這次讓你徹底弄懂她
6.2 handleradapter adapter processor (in-depth analysis of SSM and project practice)
Summary of common string algorithms
Word segmentation, naming subject recognition, part of speech and grammatical analysis in natural language processing
Mongodb (from 0 to 1), 11 days mongodb primary to intermediate advanced secret
NLP model Bert: from introduction to mastery (2)
IPFS/Filecoin合法性:保护个人隐私不被泄露
Network security engineer Demo: the original * * is to get your computer administrator rights! 【***】
JVM memory area and garbage collection
从海外进军中国,Rancher要执容器云市场牛耳 | 爱分析调研
带你学习ES5中新增的方法
Network security engineer Demo: the original * * is to get your computer administrator rights! 【***】
Thoughts on interview of Ali CCO project team
Process analysis of Python authentication mechanism based on JWT
钻石标准--Diamond Standard
The road of C + + Learning: from introduction to mastery
I've been rejected by the product manager. Why don't you know
PHP应用对接Justswap专用开发包【JustSwap.PHP】
If PPT is drawn like this, can the defense of work report be passed?
Advanced Vue component pattern (3)