Scikit learn 在windows 7上安装scikit learn for python 3.3

Scikit learn 在windows 7上安装scikit learn for python 3.3,scikit-learn,python-3.3,Scikit Learn,Python 3.3,我对Python的使用和可以安装的相关软件包是非常陌生的。 作为一名生物学家,我正在寻找许多新的软件包来帮助我模拟物种系统、生态变化等。。经过多次“谷歌搜索”,我发现了scikit learn。 但是,我在安装它时遇到了问题。我现在要借此机会为这篇文章的篇幅道歉 我使用的是64位Python 3.3,并且有相关的NumPy(MKL 1.7.0)和SciPy。我安装了distribute,它运行良好,允许我使用easy_install。 因此,为了安装scikit learn,我尝试在管理员模式下

我对Python的使用和可以安装的相关软件包是非常陌生的。 作为一名生物学家,我正在寻找许多新的软件包来帮助我模拟物种系统、生态变化等。。经过多次“谷歌搜索”,我发现了scikit learn。 但是,我在安装它时遇到了问题。我现在要借此机会为这篇文章的篇幅道歉

我使用的是64位Python 3.3,并且有相关的NumPy(MKL 1.7.0)和SciPy。我安装了distribute,它运行良好,允许我使用easy_install。 因此,为了安装scikit learn,我尝试在管理员模式下运行cmd提示符(Windows),然后也通过Python命令行。 我将下载并解压缩的tar.gz文件放在Lib\site packages文件夹中。 当我运行命令时
easy\u安装scikit学习
在cmd提示符中。 然后这是以下输出:

C:\Python33\Lib\site-packages>easy_install -U scikit-learn
Searching for scikit-learn
Reading http://pypi.python.org/simple/scikit-learn/
Reading http://scikit-learn.org
Reading http://sourceforge.net/projects/scikit-learn/files/
Reading http://scikit-learn.sourceforge.net
Best match: scikit-learn 0.12.1
Downloading http://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0
.12.1.tar.gz#md5=7e8b3434f9e8198b82dc3774f8bc9394
Processing scikit-learn-0.12.1.tar.gz
Writing c:\users\nuvraj~1\appdata\local\temp\easy_install-kvr2q0\scikit-learn-0.
12.1\setup.cfg
Running scikit-learn-0.12.1\setup.py -q bdist_egg --dist-dir c:\users\nuvraj~1\a
ppdata\local\temp\easy_install-kvr2q0\scikit-learn-0.12.1\egg-dist-tmp-l618ie
Traceback (most recent call last):
  File "C:\Python33\Scripts\easy_install-script.py", line 9, in <module>
    load_entry_point('distribute==0.6.33', 'console_scripts', 'easy_install')()
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
1937, in main
    with_ei_usage(lambda:
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
1918, in with_ei_usage
    return f()
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
1941, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "C:\Python33\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Python33\lib\distutils\dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "C:\Python33\lib\distutils\dist.py", line 936, in run_command
    cmd_obj.run()
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
358, in run
    self.easy_install(spec, not self.no_deps)
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
598, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
628, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
823, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
1103, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "C:\Python33\lib\site-packages\setuptools\command\easy_install.py", line
1089, in run_setup
    run_setup(setup_script, args)
  File "C:\Python33\lib\site-packages\setuptools\sandbox.py", line 34, in run_se
tup
    lambda: exec(compile(open(
  File "C:\Python33\lib\site-packages\setuptools\sandbox.py", line 82, in run
    return func()
  File "C:\Python33\lib\site-packages\setuptools\sandbox.py", line 37, in <lambd
a>
    {'__file__':setup_script, '__name__':'__main__'})
  File "setup.py", line 33, in <module>
  File "c:\users\nuvraj~1\appdata\local\temp\easy_install-kvr2q0\scikit-learn-0.
12.1\sklearn\__init__.py", line 86
    print "I: Seeding RNGs with %r" % _random_seed
                                  ^
SyntaxError: invalid syntax

C:\Python33\Lib\site-packages>
C:\Python33\Lib\site packages>easy\U install-U scikit learn
搜索scikit学习
阅读http://pypi.python.org/simple/scikit-learn/
阅读http://scikit-learn.org
阅读http://sourceforge.net/projects/scikit-learn/files/
阅读http://scikit-learn.sourceforge.net
最佳匹配:scikit学习0.12.1
正在下载http://pypi.python.org/packages/source/s/scikit-learn/scikit-learn-0
.12.1.tar.gz#md5=7e8b3434f9e8198b82dc3774f8bc9394
处理scikit-learn-0.12.1.tar.gz
正在编写c:\users\nuvraj~1\appdata\local\temp\easy\u install-kvr2q0\scikit-learn-0。
12.1\setup.cfg
运行scikit-learn-0.12.1\setup.py-q bdist\u egg--dist dir c:\users\nuvraj~1\a
ppdata\local\temp\easy\u install-kvr2q0\scikit-learn-0.12.1\egg-dist-tmp-l618ie
回溯(最近一次呼叫最后一次):
文件“C:\Python33\Scripts\easy\u install-script.py”,第9行,在
加载入口点('distribute==0.6.33','console\u scripts','easy\u install')()
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
主要是1937年
使用_ei_(λ:
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
1918年,与_ei_一起使用
返回f()
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
1941年,在
distclass=DistributionWithout帮助命令,**kw
文件“C:\Python33\lib\distutils\core.py”,第148行,在安装程序中
dist.run_命令()
文件“C:\Python33\lib\distutils\dist.py”,第917行,在run\u命令中
self.run_命令(cmd)
文件“C:\Python33\lib\distutils\dist.py”,第936行,在run_命令中
cmd_obj.run()
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
358,在逃
自我。易于安装(规范,非自我。无需安装)
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
598,易于安装
返回自安装项目(规格、距离位置、tmpdir、deps)
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
628,在安装项目中
dists=self.install_-eggs(规范、下载、tmpdir)
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
823,在安装中
返回self.build\u和安装(安装程序脚本、安装程序库)
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
1103,内置和安装
self.run\u安装程序(安装程序脚本、安装程序库、参数)
文件“C:\Python33\lib\site packages\setuptools\command\easy\u install.py”,第行
1089,运行中设置
运行安装程序(安装程序脚本,args)
文件“C:\Python33\lib\site packages\setuptools\sandbox.py”,第34行,运行时
塔普
lambda:exec(编译)(打开(
文件“C:\Python33\lib\site packages\setuptools\sandbox.py”,第82行,正在运行
返回func()
文件“C:\Python33\lib\site packages\setuptools\sandbox.py”,第37行,在
{文件:安装脚本,'.'名称'.'':'.'主'.'})
文件“setup.py”,第33行,在
文件“c:\users\nuvraj~1\appdata\local\temp\easy\u install-kvr2q0\scikit-learn-0。
12.1\sklearn\\uuuuu init\uuuuuu.py“,第86行
打印“I:使用%r”%\u随机种子播种RNG”
^
SyntaxError:无效语法
C:\Python33\Lib\site包>
因此,小“^”似乎指向了带有%r的“after RNG”。我可以看出,它位于.tar.gz文件中sklearn文件夹的“init”文件中

在pythongui和命令行中运行它时,我也会得到相同的结果

如何使用Python 3.3安装scikit learn?是否有方法构建或编辑该文件以克服此无效语法错误

任何帮助都将不胜感激。我很抱歉这是一个如此长的帖子。我只是想在那里得到所有的细节

谢谢
Simon

scikit learn还不支持Python 3。现在您需要Python 2.7


计划于2013年第2季度发布的0.14版本预计会对Python 3提供适当的支持。

我不是专家,但据我所知,Python 3.*中的print语句现在是一个函数,名为like:print()。因此,在这种情况下,一个快速解决方案是更改

print "I: Seeding RNGs with %r" % _random_seed


好的。谢谢。我会继续检查更新的版本,谢谢你的辛勤工作
print("I: Seeding RNGs with %r" % _random_seed)