[ckan-dev] How to Install Datastorer?
Dominik Moritz
dominik.moritz at okfn.org
Tue Jul 9 17:09:47 UTC 2013
Hi,
I'm really sorry but I have sent you the wrong command. It's `python setup.py develop`, not `paster setup.py develop`.
However, it doesn't matter in your case because you have a package install :-)
To solve the import error, you have to use /usr/lib/ckan/default/bin/activate and then install the datastorer in this environment. This can be done by cloning the repo and then running `python setup.py develop` or using pip as described in the datastorer readme.
Really sorry about the confusion,
Dominik
On 8 Jul 2013, at 18:46, zigchg at gmail.com wrote:
> Hello,
>
>
>
> Thank you for your help! But I am really a beginner about ubuntu and terminal, so I guess I might misunderstand something.
>
>
>
> When you mentioned 'activate the virtual enviroment', do you mean . /usr/lib/ckan/default/bin/activate or . ~/pyenv/bin/activate ? (Although I have tried both, it seems not working.)
>
>
>
> When we use . /usr/lib/ckan/default/bin/activate, we got the error message:
>
>
>
> (default)root at ubuntu:/usr/lib/ckan/default/src/ckan# paster setup.py develop
> Command 'setup.py' not known (you may need to run setup.py egg_info)
> Known commands:
> Known commands:
> celeryd Celery daemon
> check-po-files Check po files for common mistakes
> color Create or remove a color scheme.
> create Create the file layout for a Python distribution
> create-test-data Create test data in the database.
> dataset Manage datasets
> datastore Perform commands to set up the datastore.
> db Perform various tasks on the database.
> exe Run #! executable files
> front-end-build Creates and minifies css and JavaScript files
> help Display help
> less Compile all root less documents into their CSS counterparts
> make-config Install a package and create a fresh config file/directory
> minify Create minified versions of the given Javascript and CSS files.
> notify Send out modification notifications.
> plugin-info Provide info on installed plugins.
> points Show information about entry points
> post Run a request for the described application
> profile Code speed profiler
> ratings Manage the ratings stored in the db
> rdf-export Export active datasets as RDF
> request Run a request for the described application
> search-index Creates a search index for all datasets
> serve Serve the described application
> setup-app Setup an application, given a config file
> sysadmin Gives sysadmin rights to a named user
> tracking Update tracking statistics
> trans Translation helper functions
> user Manage users
>
>
>
> When we use . ~/pyenv/bin/activate, we got the error message:
>
>
>
> (pyenv)root at ubuntu:/usr/lib/ckan/default/src/ckan# paster setup.py develop
> Command 'setup.py' not known (you may need to run setup.py egg_info)
> Known commands:
> Traceback (most recent call last):
> File "/usr/bin/paster", line 4, in <module>
> command.run()
> File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 104, in run
> invoke(command, command_name, options, args[1:])
> File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 143, in invoke
> exit_code = runner.run(args)
> File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 809, in run
> command.load().summary)
> File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
> entry = __import__(self.module_name, globals(),globals(), ['__name__'])
> File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 10, in <module>
> import ckan.lib.fanstatic_resources as fanstatic_resources
> File "/usr/lib/ckan/default/src/ckan/ckan/lib/fanstatic_resources.py", line 6, in <module>
> from fanstatic import Library, Resource, Group, get_library_registry
> ImportError: No module named fanstatic
>
>
>
> We are confused, could anyone please help us? Thanks so much!
>
>
>
> Sincerely,
>
>
>
> Shawn
>
>
>
>> Hey,
>> just go into your ckan folder, activate the virtual environment and run `paster setup.py develop`.
>> Hope this helps,
>> Dominik
>
>
>>> Hi guys,
>>>
>>> Thank you for the help last time. Now we are installing datastorer, under terminal in Ubuntu, following the steps with celery in https://github.com/okfn/ckanext->>datastorer .
>>>
>>> However, when we tried to run the paster command as:
>>>
>>> $ (pyenv) paster datastorer update -c /etc/ckan/default/production.ini
>>>
>>> It failed and indicated as:
>>>
>>> [...]
>>> File ?/root/pyenv/src/ckanext-datastorer/ckanext/datastorer/commands.py?, line 11, in <module> from ckan.lib.cli import CkanCommand
>>> ImportError: No module named ckan.lib.cli
>>>
>>> I checked the file commands.py, in the line 11, it wrotes:
>>>
>>> from ckan.lib.cli import CkanCommand
>>>
>>> It seems the paster command cannot find ckan.lib.cli, is that the problem? How can us solve it?
>>>
>>> Thank you!
>>>
>>> Shawn
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
Dominik Moritz
CKAN developer | skype: d.moritz | @doobly_doo
The Open Knowledge Foundation
Empowering through Open Knowledge
http://okfn.org/ | @okfn | http://ckan.org | @CKANproject
More information about the ckan-dev
mailing list