简体   繁体   English

使用easy_install安装样条软件包

[英]installing spline package with easy_install

I've got a chart that I build in Python. 我有一个用Python构建的图表。 The graph looks like this: 该图如下所示:

在此处输入图片说明

...and the graphing bit of the code looks like this: ...并且代码的图形显示如下:

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])

I'm trying to use the spline package as discussed in answers like this to smooth the graph out, but I'm really struggling to install the relevant package... I'm doing this on a (dreamhost) server so I have to build my own environment, but when I try and get hold of spline: 我正在尝试使用像这样的答案中讨论的样条程序包来平滑图形,但我真的很努力地安装相关的程序包...我正在(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$ 

What am I doing wrong? 我究竟做错了什么? Where would I find the package? 我在哪里可以找到包裹?

If you do a search on https://pypi.python.org/pypi?%3Aaction=search&term=spline&submit=search you see that there is no package with name "spline", but some with similar names. 如果您在https://pypi.python.org/pypi?%3Aaction=search&term=spline&submit=search上进行搜索,您会发现没有名称为“ spline”的软件包,但有些名称相似。 Maybe the package details helps you finding the one you are looking for. 也许包裹的详细信息可以帮助您找到所需的包裹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM