簡體   English   中英

使用easy_install安裝樣條軟件包

[英]installing spline package with easy_install

我有一個用Python構建的圖表。 該圖如下所示:

在此處輸入圖片說明

...並且代碼的圖形顯示如下:

def graph(seconds,now, dayold, threedayold,weekold):
    dis=4*24*60*60
    x = np.array(seconds[-dis:])

    ynow = np.array(now)
    yday = np.array(dayold)
    y3day = np.array(threedayold)
    yweek = np.array(weekold)
    plt.plot(x,ynow, 'blue')
    plt.plot(x,yday, 'green')
    plt.plot(x,y3day,'purple')
    plt.plot(x,yweek, 'red')
#   plt.fill_between(x,ynow,yday,color='lightblue')
#   plt.fill_between(x,yday,y3day,color='green')
#   plt.fill_between(x,y3day,yweek,color='purple')
#   plt.fill_between(x,yweek,[0] *len(seconds),color='red')
    currenttime=int(seconds[0])
    lastweek=myround(currenttime-7*24*3600)
    plt.xlim(lastweek, currenttime)
    plt.ylim(ymax=100)
    ticks=np.arange(lastweek,currenttime,24*3600)
    labels=[time.strftime("%a", time.gmtime(x)) for x in ticks]
    plt.xticks(ticks,labels)
    plt.grid()
    plt.savefig('/home/joereddington/joereddington.com/stress/stress.png')

a=processFile("/home/joereddington/Jurgen/tracking/results.txt")
print "file processed"
graph(a[0],a[1],a[2],a[3],a[4])

我正在嘗試使用像這樣的答案中討論的樣條程序包來平滑圖形,但我真的很努力地安裝相關的程序包...我正在(dreamhost)服務器上執行此操作,因此我必須建立自己的環境,但是當我嘗試掌握樣條線時:

joereddington@blout:~/env$ easy_install --install-dir=~/env spline 
Searching for spline
Reading http://pypi.python.org/simple/spline/
Couldn't find index page for 'spline' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for spline
error: Could not find suitable distribution for Requirement.parse('spline')
joereddington@blout:~/env$ 

我究竟做錯了什么? 我在哪里可以找到包裹?

如果您在https://pypi.python.org/pypi?%3Aaction=search&term=spline&submit=search上進行搜索,您會發現沒有名稱為“ spline”的軟件包,但有些名稱相似。 也許包裹的詳細信息可以幫助您找到所需的包裹。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM