What should I do if an error occurs when installing numpy in pycharm?

Source: Internet
Author: User
Microsoftvisualc ++ 10.0 is installed on my computer. Why should pip be correct? I found it in pycharm and it automatically helped me install it, no problem. I installed microsoft visual c ++ 10.0 on my computer. Why?
Pip version should be okay. I found it in pycharm and it automatically helped me install it. There is no problem in replying to the content: there are lots of bugs when you try to use 'pip install package' in windows.
A better solution is go to http://www.lfd.uci.edu /~ Gohlke/pythonlibs/ And download your target packge. It took several hours to finally solve the problem. Now I posted a blog post, hoping to help others.

In windows, how can I quickly and elegantly use the python scientific computing library?

Python is a powerful programming language that provides many scientific computing modules, including numpy, scipy, pandas, and matplotlib. To use Python for scientific computing, you need to install the required modules one by one. These modules may depend on other software packages or libraries, so installation and use are relatively troublesome. Fortunately, someone is doing this kind of thing, compiling all the modules required by scientific computing, and then packaging them for users in the form of release, anaconda is one of the commonly used scientific computing releases.

From the website (link 1) The default version of Anaconda downloaded has many built-in libraries (link 2), Including numpy.

Although Anaconda already comes with a large number of common scientific computing modules, it can be used directly. Sometimes you need to install some other python modules. For example:


Conda

Anaconda comes with the conda command for installing and updating modules. For example:


1 conda install scipy2 conda update scipy
PyCharm's Preferences-> Project Interpreter automatically detects many packages that can be installed in python. If pip fails, it is better to directly use the optional installation package on PyCharm (the simplest method)




Bytes ----------------------------------------------------------------------------------------------------------------------------
I come to the mac version, PyCharm installed NumPy, SciPy and other scientific computing packages (Anaconda) for mac OS X

And modified some according to @ zhusleep's answer.


Applicability

For example, if I learned something about machine learning some time ago, I want to learn python well and find 10 of the best Python ides.Select python IDE or PyCharm(Python IDE developed by JetBrains ).

Therefore, this article applies:

  1. Like or use PyCharm IDE, or an IDE
  2. Students who need to use python for scientific computing, data mining, machine learning, and deep learning (that is, they need to install NumPy, SciPy, and other scientific computing packages)
  3. Mac OSX System
  4. Lazy !!! Installing Numpy, Scipy, Matlotlib, Scikit-learn, and other libraries in Python is really a tear (using pip or other methods). Various incompatibility problems and errors are reported, each module may depend on other software packages or libraries. Installing it on your own is a hassle!
  • If conditions 2 and 4 are met, and you are in windows, we strongly recommendPython (x, y)(Currently, only the windows version is available. Spyder has the Mac version)
    This includes Spyder and various scientific computing packages and tools. If you are a beginner and have no worries, you will not be afraid of using IDE or installing the installation package later, select XXX and so on.

    Python (x, y) Official
    Other Python (x, y)

  • If condition 1 is met, it is as difficult to remove PyCharm as I do, but in windows, it is similar to the process below, but it will be better to select windows.

  • The key is that I meet the condition 4, less detours, less time spent on the configuration environment, more time code, O ~

  • For children's shoes that do not meet Condition 4 and want to experience such a childbirth process, refer to the experiences of others (refer to the article ):
    [Python] installing numpy + scipy + matlotlib + scikit-learn and problem solving
    Use numpy, scipy, matplotlib, and ipython for data analysis in Mac: Initialize the environment
    In windows, how can I quickly and elegantly use the python scientific computing library?

Install Anaconda

Because of Condition 4, some people compile all the modules required by scientific computing, and then package them for use in the form of a release, anaconda is one of the commonly used scientific computing releases.

  1. Download Anaconda Official Website
    Select your own python version number and graphical installation/command line installation (I selected graphical installation), download it, and double-click to start installation. If you select command line installation, follow the instructions on the official website to install it.
    If you do not need a specific IDE, use the Anaconda spyder.

  2. How to set up an IDE to use AnacondaSet an IDE to use Anaconda (also in the official document of Anaconda)
    Including:

    • Spyder
    • Python Tools for Visual Studio (PTVS)
    • PyCharm
    • Eclipse & PyDev
    • Wing IDE
    • Ninja IDE

Here is a simple example of PyCharm configuration.
PyCharm's Preferences-> Project Interpreter-> Add local-> select bin/python under the file where Anaconda is installed




Apply-> OK




Finally, we recommend some python self-learning resources for sharing.



| -- Tool class

| --- 10 of the best Python IDERecommended pycharm

| ---Python (x, y)(Currently only for windows systems, Spyder has Mac) official Python (x, y)Other Python (x, y)


Suitable for scientific computing, data mining, and machine learning.


Python (x, y) is a handy scientific and engineering development application specially designed for numerical computations, data analysis and data visualization. it is based on Python programming language, Qt graphical user interfaces, Eclipse integrated development environment and Spyder interactive scientific development environment. with Python (x, y), one can do: Interactive calculations including for example 2D and 3D plotting or symbolic maths, Simple functional programming (with MATLA .....

| --- Python TutorA visual programming tool that intuitively shows the execution process of each line of code on a computer.


Helps people overcome a fundamental barrier to learning programming: understanding what happens as the computer executes each line of a program's source code.


Using this tool, you can write Python, Java, JavaScript, TypeScript, Ruby, C, And C ++Programs in your Web browser and visualize what the computer is doing step-by-step as it executes those programs.



| -- Manual

| --- Python Official Website

| --- W3shool technical documentation on Python 2.xx

| ---- Webpage address: Basic Python tutorial

| --- W3shool technical documentation on Python 3.xx

| ---- Webpage: http://www.w3cschool.cc/python3/python3-tutorial.html

| ---- Network Disk address (a full set of W3shool pdf documentation): http://pan.baidu.com/s/1c0lMaYW

| --- Python Chinese developer Website: PythonTab: Python Chinese developer community portal

| --- PyTab online manual center: PyTab online manual Center

| --- WEB Developer Python Website: Python-WEB Developer

| --- Linux CentOS Chinese site: CentOS Chinese site

| --- Linux Study-Area: Study-Area

| --- 36 big data knowledge sharing websites: 36 big data | focus on the practical application of big data: China's big data commercial New Media

| --- Cnblog Python quick tutorial (Vamei): Python quick tutorial


| -- Class library
| --- Python Machine Learning class library: http://scikit-learn.org/stable/


| -- Book Nationality

| --- Python programming related books download: http://pan.baidu.com/wap/link? Uk = 4228308634 & Region ID = 586479154 & third = 0

| --- WEB development related books download: http://yun.baidu.com/s/1jGmKgfG

| --- Magnus Lie Hetland, Beginning Python: from Novice to Professional, 2nd edition, Apress.

| --- Wesley Chun, Core Python Applications Programming, Prentice Hall. (translated in the second edition as "Python Core Programming")



| -- Video

| --- Khan University Open Course: Computer Science

| ---- Class: focus on operations

| ---- Webpage address: Khan University Open Course: Computer Science

| --- MIT open course: Introduction to computer science and Programming

| ---- Class: programming basics, program Theory

| ---- Webpage address: MIT open course: Introduction to computer science and Programming

| ---- Network Disk address (MIT official documentation): http://yun.baidu.com/s/1mg9OHbq

| ---- Network Disk address (all video version): http://yun.baidu.com/s/1c02F9ew

| --- MIT open course: Introduction to Algorithms

| ---- Category: advanced learning (suitable for friends who have time and love algorithms)

| ---- Webpage address: MIT open course: Introduction to Algorithms
| ---- Network Disk address: http://yun.baidu.com/s/1mg5f5xQ

| --- Harbin Institute of Technology: getting started with program design-Python (Final Version)

| ---- Category: the first version of this course, suitable for friends with relatively tight time

| ---- Webpage address: getting started with programming

| --- Coursera MOOC:Use Python to convert Data

| ---- Class: Using Python to conveniently and quickly obtain, represent, analyze, and present data, you can use multiple cases to easily and happily learn how to use Python to play with data in various fields.

| ---- Webpage: https://www.coursera.org/learn/hipython/home/welcome

What you need is
Microsoft Visual C ++ Compiler for Python 2.7
Visual C ++ compute for Python 2.7 Installing the Python package to be compiled in Windows is really not easy.

If scientific computing is often required, we recommend that you uninstall Python and install Anaconda or Miniconda. Pip install numpy
If there is no pip, you can install it.
That is, numpy does need the msvc 2010 compiler.
You can go to it or go to the numpy binary (with MKL) https://link.zhihu.com /? Target = http % 3A // www.lfd.uci.edu/%7egohlke/pythonlibs/it is easier to use Numpy or compiled packages in winallWindows. Go here (Numerical Python Download the appropriate version, installation is http://www.lfd.uci.edu /~ Gohlke/pythonlibs/ Find the required package and pip install xxx. whl.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.