I have two Python settings in my machine. One is Python 2.7.6 coming with Enthought Canopy, and is the 2.7.9 file I have downloaded from Python website.
I tried to install Whoosh in both of them. It went fine. In Enthought I have installed it as pip install whoosh given in the following command prompt, Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Admin>
I was trying to practice examples given in https://pythonhosted.org/Whoosh/quickstart.html#a-quick-introduction in both.In the IDLE of Python 2.7.9 it ran fine, but in the IDLE of Python 2.7.6 of Enthought it is giving error as,
Python 2.7.6 | 64-bit | (default, Sep 15 2014, 17:36:35) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import whoosh
>>> from whoosh.index import create_in
>>> from whoosh.fields import *
>>> schema = Schema(title=TEXT(stored=True), path=ID(stored=True), content=TEXT)
>>> ix = create_in("index", schema)
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
ix = create_in("index", schema)
File "C:\Users\Admin\AppData\Local\Enthought\Canopy\User\lib\site-packages\whoosh\index.py", line 102, in create_in
return FileIndex.create(storage, schema, indexname)
File "C:\Users\Admin\AppData\Local\Enthought\Canopy\User\lib\site-packages\whoosh\index.py", line 425, in create
TOC.create(storage, schema, indexname)
File "C:\Users\Admin\AppData\Local\Enthought\Canopy\User\lib\site-packages\whoosh\index.py", line 605, in create
for filename in storage:
File "C:\Users\Admin\AppData\Local\Enthought\Canopy\User\lib\site-packages\whoosh\filedb\filestore.py", line 81, in __iter__
return iter(self.list())
File "C:\Users\Admin\AppData\Local\Enthought\Canopy\User\lib\site-packages\whoosh\filedb\filestore.py", line 518, in list
files = os.listdir(self.folder)
WindowsError: [Error 3] The system cannot find the path specified: 'index/*.*'
>>>
I tried to find a solution from the web and tried to fix the Pythonpath.
But as I set it the IDLE of 2.7.6 did not open at all.
Please suggest how may I fix it.
I am opening IDLE standard way, Start>All Programs>IDLE(Python GUI) for 2.7.9 and Start>All Programs>Enthought Canopy(64-bit)>IDLE(64-bit).
I am setting PYTHONPATH as Start>Computer right click from there Advanced System Settings, here Advanced tab, then Environment Variables.