简体   繁体   English

如何在MAC上将Orange导入Python站点包

[英]How to Import Orange into Python Site-Package on a MAC

I need to import orange into python on a MAC, ie do this: 我需要将橙色导入MAC上的python中,即执行以下操作:

import Orange
data=Orange.data.Table ("lenses")
print data.domain.features

When I tried to easy_install orange, permission to write into /Library/Python/2.7/site-packages/ was denied. 当我尝试easy_install orange时,拒绝写入/Library/Python/2.7/site-packages/的权限。 Can someone please provide a newbie with some way to get around this? 有人可以为新手提供一些解决方法吗?

I can also work with the python that comes bundled with orange located in /Applications/Orange.app/Contents/MacOS. 我还可以使用/Applications/Orange.app/Contents/MacOS中与橙色捆绑在一起的python进行工作。 But if I navigate there on my terminal, is there an easy way to grab my source files buried deep in my Documents folder? 但是,如果我在终端上导航,是否有一种简单的方法来获取隐藏在“文档”文件夹中的源文件?

I have been checking out sites for hours but there doesn't seem to be a clear path to get this done. 我已经检查了几个小时的网站,但似乎没有明确的路径来完成此操作。

To get past permission being denied, run sudo easy_install orange . 要获得过去的权限被拒绝,请运行sudo easy_install orange This will then ask for an admin password for your computer which you can provide, thereby granting the permission. 然后,这将要求您提供计算机的管理员密码,从而授予权限。

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

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