Home Backend Development Python Tutorial Detailed explanation on how to install Anaconda and python on Windows

Detailed explanation on how to install Anaconda and python on Windows

Apr 28, 2017 am 09:39 AM
anaconda python windows

This article mainly introduces you to the detailed tutorial of installing Anaconda and python on Windows. It is very good and has reference value. Friends who need it can refer to it

When it comes to digital image processing programming, most people may I think of matlab, but matlab also has its own shortcomings:

1. It is not open source and expensive.

2. The software capacity is large. Generally, it is 3G or above, and higher versions can even reach 5G or above.

3. It can only be used for research and is not easy to convert into software.

Therefore, we use the Python scripting language here for digital image processing.

To use Python, you must first install python, usually version 2.7 or above. Whether it is a Windows system or a Linux system, the installation is very simple.

To use python for various development and scientific calculations, you also need to install the corresponding packages. This is very similar to matlab, except that it is called a toolbox in matlab, and it is called a library or package in python. There are actually many digital image processing packages developed based on python scripting language, such as PIL, Pillow, OpenCV, scikit-image, etc.

Comparing these packages, PIL and Pillow only provide the most basic digital image processing, with limited functions; OpenCV is actually a C++ library that only provides a python interface, and the update speed is very slow. Up to now, python has developed to version 3.5, while opencv only supports version 2.7 of python; scikit-image is an image processing package based on scipy. It processes images as numpy arrays, just like matlab. Therefore, we finally chose scikit-image performs digital image processing.

1. Required installation packages

Because scikit-image is based on scipy for calculations, it is certain to install numpy and scipy. To display images, you also need to install the matplotlib package. To sum up, the required packages are:

Python >= 2.6
Numpy >= 1.6.1
Cython >= 0.21
Six >=1.4
SciPy >=0.9
Matplotlib >= 1.1.0
NetworkX >= 1.8
Pillow >= 1.7.8
dask[array] >= 0.5.0
Copy after login

Comparatively, it is very troublesome to install, especially scipy, which is basically impossible to install on Windows.

But don’t be afraid, we just need to choose an integrated installation environment. We recommend Anaconda. It integrates all the above required packages, so we actually only need to install it from beginning to end. Anaconda software is enough, nothing else needs to be installed.

2. Download and install anaconda

First go to www.continuum.io/downloads to download anaconda. The current version is python2 .7 version and python3.5 version, download the corresponding version and anaconda of the corresponding system. It is actually an sh script file, about 280M.

This series takes windows7+python3.5 as an example, so we download the version in the red box as shown below:

Detailed explanation on how to install Anaconda and python on Windows

The name is: Anaconda3-2.4. 1-Windows-x86_64.exe

is an executable exe file. Once the download is complete, you can install it by double-clicking it.

When installing, assume that we install in the root directory of drive D, such as:

Detailed explanation on how to install Anaconda and python on Windows

and select both options and write the installation path Enter environment variables.

Detailed explanation on how to install Anaconda and python on Windows

Then just wait for the installation to complete.

After the installation is completed, open the Windows command prompt:

Enter conda list to check which libraries are currently installed. The commonly used numpy and scipy are among them. If you have any packages that have not been installed, you can run

conda install *** to install them. (*** is the name of the required package)

If a package version is not the latest, run conda update *** to update it.

3. Simple test

anaconda comes with an editor spyder, we can use this editor to write code in the future .

Spyder.exe is placed in the scripts in the installation directory. For example, mine is D:/Anaconda3/scripts/spyder.exe. Just double-click it to run it. We can right-click and send to desktop shortcut, which will be more convenient to run in the future.

We simply write a program to test whether the installation is successful. This program is used to open a picture and display it. First prepare a picture, then open spyder and write the following code:

from skimage import io
img=io.imread('d:/dog.jpg')
io.imshow(img)
Copy after login

Change d:/dog.jpg to your picture location

Then click the green in the toolbar above Triangle is run, and finally

Detailed explanation on how to install Anaconda and python on Windows

# is displayed. If the "Ipython console" in the lower right corner can display a picture, it means that our running environment is successfully installed.

We can select "variable explorer" in the upper right corner to view image information, such as

Detailed explanation on how to install Anaconda and python on Windows

We can save this program, pay attention to the python script file The suffix is ​​py.

4. Submodule of skimage package

skimage包的全称是scikit-image SciKit (toolkit for SciPy) ,它对scipy.ndimage进行了扩展,提供了更多的图片处理功能。它是由python语言编写的,由scipy 社区开发和维护。skimage包由许多的子模块组成,各个子模块提供不同的功能。主要子模块列表如下:

子模块名称 主要实现功能
io读取、保存和显示图片或视频
data提供一些测试图片和样本数据
color颜色空间变换
filters图像增强、边缘检测、排序滤波器、自动阈值等
draw操作于numpy数组上的基本图形绘制,包括线条、矩形、圆和文本等
transform几何变换或其它变换,如旋转、拉伸和拉东变换等
morphology形态学操作,如开闭运算、骨架提取等
exposure图片强度调整,如亮度调整、直方图均衡等
feature特征检测与提取等
measure图像属性的测量,如相似性或等高线等
segmentation图像分割
restoration图像恢复
util通用函数

用到一些图片处理的操作函数时,需要导入对应的子模块,如果需要导入多个子模块,则用逗号隔开,如:

from skimage import io,data,color
Copy after login

The above is the detailed content of Detailed explanation on how to install Anaconda and python on Windows. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Can visual studio code be used in python Can visual studio code be used in python Apr 15, 2025 pm 08:18 PM

VS Code can be used to write Python and provides many features that make it an ideal tool for developing Python applications. It allows users to: install Python extensions to get functions such as code completion, syntax highlighting, and debugging. Use the debugger to track code step by step, find and fix errors. Integrate Git for version control. Use code formatting tools to maintain code consistency. Use the Linting tool to spot potential problems ahead of time.

Is the vscode extension malicious? Is the vscode extension malicious? Apr 15, 2025 pm 07:57 PM

VS Code extensions pose malicious risks, such as hiding malicious code, exploiting vulnerabilities, and masturbating as legitimate extensions. Methods to identify malicious extensions include: checking publishers, reading comments, checking code, and installing with caution. Security measures also include: security awareness, good habits, regular updates and antivirus software.

Python: Automation, Scripting, and Task Management Python: Automation, Scripting, and Task Management Apr 16, 2025 am 12:14 AM

Python excels in automation, scripting, and task management. 1) Automation: File backup is realized through standard libraries such as os and shutil. 2) Script writing: Use the psutil library to monitor system resources. 3) Task management: Use the schedule library to schedule tasks. Python's ease of use and rich library support makes it the preferred tool in these areas.

Golang vs. Python: Concurrency and Multithreading Golang vs. Python: Concurrency and Multithreading Apr 17, 2025 am 12:20 AM

Golang is more suitable for high concurrency tasks, while Python has more advantages in flexibility. 1.Golang efficiently handles concurrency through goroutine and channel. 2. Python relies on threading and asyncio, which is affected by GIL, but provides multiple concurrency methods. The choice should be based on specific needs.

Python vs. JavaScript: The Learning Curve and Ease of Use Python vs. JavaScript: The Learning Curve and Ease of Use Apr 16, 2025 am 12:12 AM

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

Can visual studio code run python Can visual studio code run python Apr 15, 2025 pm 08:00 PM

VS Code not only can run Python, but also provides powerful functions, including: automatically identifying Python files after installing Python extensions, providing functions such as code completion, syntax highlighting, and debugging. Relying on the installed Python environment, extensions act as bridge connection editing and Python environment. The debugging functions include setting breakpoints, step-by-step debugging, viewing variable values, and improving debugging efficiency. The integrated terminal supports running complex commands such as unit testing and package management. Supports extended configuration and enhances features such as code formatting, analysis and version control.

Can vs code run python Can vs code run python Apr 15, 2025 pm 08:21 PM

Yes, VS Code can run Python code. To run Python efficiently in VS Code, complete the following steps: Install the Python interpreter and configure environment variables. Install the Python extension in VS Code. Run Python code in VS Code's terminal via the command line. Use VS Code's debugging capabilities and code formatting to improve development efficiency. Adopt good programming habits and use performance analysis tools to optimize code performance.

Golang vs. Python: Key Differences and Similarities Golang vs. Python: Key Differences and Similarities Apr 17, 2025 am 12:15 AM

Golang and Python each have their own advantages: Golang is suitable for high performance and concurrent programming, while Python is suitable for data science and web development. Golang is known for its concurrency model and efficient performance, while Python is known for its concise syntax and rich library ecosystem.

See all articles