English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
I was driven crazy by the installation of the numpy module just to draw a picture!!! It couldn't be installed, and I spent several hours, read many tutorials and methods on the Internet, and found that the summaries were not very comprehensive. I summarize this here to prevent others from encountering this problem without a solution.
One of the charms of Python is that it has many powerful plugins, but the search, installation, and upgrade of these plugins on the Windows system are very troublesome. First, after installing Python, you need to configure the system environment variables, and then you need to install Setuptools, and there will also be encoding errors during the installation process. For those who need to install the source code, you also need to type commands in CMD, and you need to be very careful to avoid typing the wrong parameters. Without the guidance of an experienced person, installing, upgrading, and uninstalling plugins are all big problems!
environment introduction, python2.7.2,win7,VS2010.
Method One:
1、firstly selected easy_installnumpy, installation failed: Unable to find vcvarsall.bat
2、gohttps://sourceforge.net/projects/numpy/files/NumPy/Manually download the installation package, for Windows system choose zip, for Unix system choose tar.gz. After downloading, unzip and enter the folder in the system command line, execute pythonsetup.pyinstall, but the installation still fails: the general situation is: error: Unable to find vcvarsall.bat, which means that Microsoft VC is missing.++9.0, which may mean that your computer has installed a higher version of VS, and it requires VS2008due to lack of support, so the error occurs.
One possible solution is:
If your machine has installed VisualStudio2010Before executing easy_install, you can first execute the following command:
SETVS90COMNTOOLS=%VS100COMNTOOLS%
If you have installed VisualStudio2012You can execute the following command:
SETVS90COMNTOOLS=%VS110COMNTOOLS%
If you have installed the vs version is2013You can use the following command:
SETVS90COMNTOOLS=%VS120COMNTOOLS%
It may not be successful, but it is worth a try~
Method Two:
Be sure to choose the whl file according to your Python version and the bit number of your computer. To install the whl file, you need to install the whl package first. Enter cmd and input
pip install wheel
After the installation is successful, download the corresponding numpy wheel file, navigate to the local file storage location in the cmd. Then enter
pip install numpy‑1.9.2+mkl‑cp27‑none‑win_amd64.whl
The last part of the above statement is the filename. According to your description of the problem, you should download this file, and then press Enter to automatically install it.
This is also the method to install the .whl file for Python.
Method Three:
Install Anaconda: Anaconda Scientific Python Distribution, which has integrated many scientific computation libraries (including numpy, sklearn, pandas, etc.). python2.7python3.4All of them.
You can also directly install the software python(x, y), which almost contains all the commonly used Python libraries and many practical tools, and has a high installation success rate.
This method can directly solve your current drawing problem.
Method Four:
Find that it is very convenient to manage plugins in PyCharm on the Windows platform, completely without needing to type commands, just click with the mouse, which is very convenient.
Firstly, open the project project, and open the toolbar file----Find settings, open it:
Find the plus and minus sign on the right side of project_interpreter, which is the management of various modules. Click the plus sign:
Search for numpy, click InstallPackage, and you can install it. Make sure the network is unblocked! Wait and see~~
Among the above four methods, the first two may not be successful, the third one directly changes the place to solve the problem, and the fourth one may also need to install Pycharm in advance if there is no Pycharm.
I personally recommend the fourth solution, which can free you from various module installation problems in the future, and is a one-time solution!
Summary
This is the summary of the simple solutions to the failure of numpy module installation in this article about Python, I hope it will be helpful to everyone. Those who are interested can continue to refer to this site:
Python under windows+Practical tutorial for numpy installation
A Brief Discussion on Several Sorting Methods of numpy Arrays
Detailed Explanation of numpy Array Generation
If there are any shortcomings, please leave a message to point them out. Thank you friends for your support to this site!
Declaration: The content of this article is from the Internet, the copyright belongs to the original author, the content is contributed and uploaded by Internet users spontaneously, this website does not own the copyright, does not undergo manual editing, and does not assume relevant legal liability. If you find any content suspected of copyright infringement, please send an email to: notice#oldtoolbag.com (Please replace # with @ when sending an email to report abuse, and provide relevant evidence. Once verified, this site will immediately delete the infringing content.)