【问题标题】:installing spline package with easy_install使用 easy_install 安装样条包
【发布时间】:2015-02-06 02:55:45
【问题描述】:

我有一个用 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])

我正在尝试使用answers like this 中讨论的 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$ 

我做错了什么?我在哪里可以找到包裹?

【问题讨论】:

  • 从链接的答案来看,它是scipy.interpolate.spline,所以它是scipy的一部分。如果您指的是另一个 spline 软件包,请使用相关信息更新您的问题。
  • 是的 - 就是这个:)

标签: python easy-install spline


【解决方案1】:

如果您在https://pypi.python.org/pypi?%3Aaction=search&term=spline&submit=search 上进行搜索,您会看到没有名称为“spline”的包,但有些包名称相似。也许包裹的详细信息可以帮助您找到您正在寻找的那个。

【讨论】:

    猜你喜欢
    • 2013-09-22
    • 1970-01-01
    • 1970-01-01
    • 2014-12-04
    • 1970-01-01
    • 1970-01-01
    • 2010-11-05
    • 2016-04-26
    • 1970-01-01
    相关资源
    最近更新 更多