windows下python 3.9 Numpy scipy和matlabplot的安裝教程詳解
學(xué)習(xí)python過程中想使用python的matlabplot繪圖功能,遇到了一大批問題,然后一路過關(guān)斬將,最終安裝成功,實(shí)為不易,發(fā)帖留念。
1 首先打開cmd
win+r
2 pip安裝
pip3 install --user numpy scipy matplotlib
–user 選項(xiàng)可以設(shè)置只安裝在當(dāng)前的用戶下,而不是寫入到系統(tǒng)目錄。默認(rèn)情況使用國(guó)外線路,國(guó)外太慢,我們使用清華的鏡像就可以:
pip3 install numpy scipy matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
如何網(wǎng)絡(luò)不好,我們可以挨個(gè)單獨(dú)安裝
pip3 install numpy s -i https://pypi.tuna.tsinghua.edu.cn/simple pip3 install scipy -i https://pypi.tuna.tsinghua.edu.cn/simple pip3 install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
3 安裝matlabplot時(shí)遇到錯(cuò)誤:
Using legacy 'setup.py install' for matplotlib, since package 'wheel' is not installed.
Installing collected packages: matplotlib
Running setup.py install for matplotlib ... error
ERROR: Command errored out with exit status 1:
查看自己的python版本:
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.
我的python是3.9 AMD64
在https://www.lfd.uci.edu/~gohlke/pythonlibs/網(wǎng)站找到worldcould
選著自己相應(yīng)的.whl下載。我的選:
wordcloud-1.8.0-cp39-cp39-win_amd64.whl
然后回到cmd
4 安裝
pip install wordcloud-1.8.0-cp39-cp39-win_amd64.whl
5 再次出現(xiàn)錯(cuò)誤
Using legacy 'setup.py install' for matplotlib, since package 'wheel' is not installed.
直接安裝wheel
pip install wheel
6 再次安裝matlabplot
pip3 install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
不成功
7 在https://www.lfd.uci.edu/~gohlke/pythonlibs/找到matlabplot
下載后安裝,
pip3 install matplotlib-3.3.2-cp39-cp39-win_amd64.whl
顯示安裝成功,趕緊找個(gè)程序來試一下:
import numpy as np from matplotlib import pyplot as plt x = np.arange(1,11) y = 2 * x + 5 plt.title("Matplotlib demo") plt.xlabel("x axis caption") plt.ylabel("y axis caption") plt.plot(x,y) plt.show()
安裝成功,一波五折
到此這篇關(guān)于windows下python 3.9 Numpy scipy和matlabplot的安裝教程詳解的文章就介紹到這了,更多相關(guān)python 3.9 Numpy scipy和matlabplot的安裝內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Python Matplotlib 基于networkx畫關(guān)系網(wǎng)絡(luò)圖
這篇文章主要介紹了Python Matplotlib 基于networkx畫關(guān)系網(wǎng)絡(luò)圖,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-07-07python多進(jìn)程使用函數(shù)封裝實(shí)例
這篇文章主要介紹了python多進(jìn)程使用函數(shù)封裝實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2020-05-05利用Python輕松實(shí)現(xiàn)視頻轉(zhuǎn)GIF動(dòng)圖
在看視頻的時(shí)候覺得某段非常有意思想弄成動(dòng)圖,但是無從下手!本文就將介紹如何利用Python搞定這一需求,感興趣的小伙伴可以學(xué)習(xí)一下2022-01-01python實(shí)現(xiàn)的生成word文檔功能示例
這篇文章主要介紹了python實(shí)現(xiàn)的生成word文檔功能,涉及Python數(shù)據(jù)查詢、遍歷及word文檔生成相關(guān)操作技巧,需要的朋友可以參考下2019-08-08Python中的Numeric包和Numarray包使用教程
這篇文章主要介紹了Python中的Numeric包和Numarray包使用教程,來自IBM官方網(wǎng)站上的技術(shù)文檔,需要的朋友可以參考下2015-04-04Python實(shí)用小知識(shí)之對(duì)象間的比較
== 和 is 是 Python 中對(duì)象比較常用的兩種方式,簡(jiǎn)單來說,'==' 操作符比較對(duì)象之間的值是否相等,下面這篇文章主要給大家介紹了關(guān)于Python實(shí)用小知識(shí)之對(duì)象間比較的相關(guān)資料,需要的朋友可以參考下2021-10-10Python實(shí)現(xiàn)的檢測(cè)web服務(wù)器健康狀況的小程序
這篇文章主要介紹了Python實(shí)現(xiàn)的檢測(cè)web服務(wù)器健康狀況的小程序,本文使用socket庫(kù)來實(shí)現(xiàn),需要的朋友可以參考下2014-09-09關(guān)于numpy中矩陣的翻轉(zhuǎn)(flip)
這篇文章主要介紹了關(guān)于numpy中矩陣的翻轉(zhuǎn)(flip),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-06-06Python使用for生成列表實(shí)現(xiàn)過程解析
這篇文章主要介紹了Python使用for生成列表實(shí)現(xiàn)過程解析,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2020-09-09