No module named celery when installing ckanext-archiver - exception

I'm using CKAN as my open data portal and am trying to install the Archiver Extension by following the instructions at https://github.com/ckan/ckanext-archiver. However I am faced with this error which I could not solve after enabling the archiver in my ckan config file.
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 284, in command
relative_to=base, global_conf=vars)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 321, in loadapp
**kw)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
val = callable(*args, **kw)
File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 57, in make_app
load_environment(conf, app_conf)
File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
p.load_all(config)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
load(*plugins)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 149, in load
service = _get_service(plugin)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 255, in _get_service
return plugin.load()(name=plugin_name)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pkg_resources.py", line 2147, in load
['__name__'])
File "/usr/lib/ckan/default/src/ckanext-archiver/ckanext/archiver/plugin.py", line 10, in <module>
from ckan.lib.celery_app import celery
File "/usr/lib/ckan/default/src/ckan/ckan/lib/celery_app.py", line 12, in <module>
from celery import Celery
ImportError: No module named celery
I have installed the extension from an activated virtualenv and the required libraries.
sudo pip install -e git+http://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver
Obtaining ckanext-archiver from git+http://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver
Updating ./src/ckanext-archiver clone
Running setup.py egg_info for package ckanext-archiver
Installing collected packages: ckanext-archiver
Running setup.py develop for ckanext-archiver
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
Creating /usr/local/lib/python2.7/dist-packages/ckanext-archiver.egg-link (link to .)
ckanext-archiver 0.1 is already the active version in easy-install.pth
Installed /home/kean/src/ckanext-archiver
Successfully installed ckanext-archiver
sudo pip install requirements.txtDownloading/unpacking requirements.txt
Real name of requirement requirements.txt is requirements.txt
Could not find any downloads that satisfy the requirement requirements.txt
No distributions at all found for requirements.txt
Storing complete log in /home/kean/.pip/pip.log
Appreciate if anyone knows how to fix this. Thanks.

Do not call sudo pip install when you are using virtualenv, just pip install.
I had some issues executing:
pip install -e git://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver
which resulted with
no matches found: git://github.com/okfn/ckanext-archiver.git#egg=ckanext-archiver
but below commands worked just fine:
cd /tmp/
git clone git://github.com/okfn/ckanext-archiver.git
pip install -e ./ckanext-archiver
pip install -r ckanext-archiver/pip-requirements.txt

Related

unable to install mysqlclient on mac

I'm attempting to install mysqlclient using the command:
pip install mysqlclient
but i get the following error:
Using cached mysqlclient-1.3.12.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/8d/xdwdnphs1w5b_vtxrc67__5h0000gn/T/pip-build-ifu54299/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/8d/xdwdnphs1w5b_vtxrc67__5h0000gn/T/pip-build-ifu54299/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/private/var/folders/8d/xdwdnphs1w5b_vtxrc67__5h0000gn/T/pip-build-ifu54299/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
I uninstalled python3 using brew uninstall --force python3 and downloaded the binary from pythons website but to no avail. I also attempted to download mysql connector from oracle website and again to no avail. I have tried upgrading pip again still doesnt work.
PS mysql is running in a docker container and i'm running django on my local machine.
Any suggestions on why i'm getting an error attempting to install mysqlclient
For Python I can recommend pymysql is pretty good and I always use it.
https://github.com/PyMySQL/PyMySQL
or you can follow this answer
Installing MySQL Python on Mac OS X
you need to install mysql and mysql connector before install my sql client
brew install mysql
brew install mysql-connector-c

Installing mysql client in django virtual environment

I have created a virtual environment,with python 3 and installed django
I cant install mysqlclient ,it says problem with setup.py
jayanthi#jayanthi-Aspire-4920:~$ source env/bin/activate
(env) jayanthi#jayanthi-Aspire-4920:~$ pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-4pbezvx6/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-4pbezvx6/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-4pbezvx6/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4pbezvx6/mysqlclient/
on Ubuntu you must install the package:
sudo apt-get install libmysqlclient-dev

Error while installing mysqlclient on Fedora25

I am trying to install mysqlclient in my virtual environment which runs on python3.5.2 but it always throws error as:
(venv) [kevran#localhost mysite]$ pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-m92fr1vk/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-m92fr1vk/mysqlclient/setup_posix.py", line 44, in get_config libs = mysql_config("libs_r")
File "/tmp/pip-build-m92fr1vk/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-m92fr1vk/mysqlclient/
Yu need to install mysql-devel package in OS.
yum install mysql-devel
or something like that.

Upgraded to Mavericks, now errors with python MySQL DB

How do I install MySQL python through pip?
I recently upgraded to Mavericks and now none of my packages and dependencies are working.
I was successfully able to install pip via python ez_setup.py which i found from here Can't install via pip because of egg_info error
But still keep getting this error.
Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
Running setup.py (path:/private/tmp/pip_build_root/MySQL-python/setup.py) egg_info for package MySQL-python
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/tmp/pip_build_root/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
Command python setup.py egg_info failed with error code 1 in /private/var/folders/xl/lsdkfj09485039845/T/pip_build_Name/mysql-python
Storing debug log for failure in /Users/Name/Library/Logs/pip.log
I also tried running the command line; export path command I found in here.
https://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
download the shell script found here
http://www.macminivault.com/mysql-mavericks/
copy and paste the contents into as a .sh file i named mine fixeverything.sh
then from terminal run sh fixeverything.sh
then i ran this command to link mysql
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

installing mysql using pip

I've been trying to install mysql for hours now, I've gone through so many forums and everything can someone help me. Every time I run the command pip install mysql-python I get
(DjangoProject-env)Adams-MacBook-Air:DjangoProject AdamC$ pip install mysql-python
Downloading/unpacking mysql-python
Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
Running setup.py (path:/Users/AdamC/projects/Environment/DjangoProject-env/build/mysql- python/setup.py) egg_info for package mysql-python
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/Users/AdamC/projects/Environment/DjangoProject-env/build/mysql-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/Users/AdamC/projects/Environment/DjangoProject-env/build/mysql-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/AdamC/projects/Environment/DjangoProject-env/build/mysql-python
Storing debug log for failure in /Users/AdamC/.pip/pip.log
(DjangoProject-env)Adams-MacBook-Air:DjangoPoject AdamC$
I've tried sourcing a .profile
export PATH=/usr/local/mysql/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
And a few other things but I can't remember right now, any help would be greatly appreciated.
try doing
sudo apt-get install build-essential python-dev libmysqlclient-dev
later
sudo apt-get install python-mysqldb
I had this same error, but I'm not sure if it's from the same situation. I didn't originally have MySQL installed when I was trying to install mysql-python. It therefore couldn't use any MySQL commands like mysql-config.
If you don't have Mac Homebrew installed, go here to learn how to install it: http://brew.sh/
Then you can install MySQL with this command:
brew install mysql
And finally,
pip install mysql-python
should proceed to completion.
I had a similar situation. You can try:
Step1. Download the Postgres server at www.psequel.com
Step2. Select
the Gui Application link and then select the PSequel.
Step3.Once
everything has been downloaded, open your Postgres panel and then
launch the terminal by clicking "open psql." This takes you to the
terminal. Step4. You can now start using creating databases using
MySQL.
macos: If you do not use brew you can install mysql from the installer:
https://dev.mysql.com/downloads/mysql/