I have installed celeryD and redis on my system. when i am running the command using celery. iam getting the following error.
Traceback (most recent call last):
File "/usr/local/bin/celeryd", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2711, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: python-dateutil>=1.5,<2.0
what may be the possible reason??
There's a package called python-dateutil that isn't installed.
It should be available on the PYTHONPATH that's active when you call celeryd.
Python dateutil is installable from PyPi.
Assuming you have pip installed on your system, you can do so with this command:
$ pip install python-dateutil==1.5
Related
For some reason I can't install anything with pip/pip3 lately. For example, when I try to install mendeley using the command "pip install mendeley", the following error message appears:
Traceback (most recent call last):
File "/Users/u1790509/anaconda3/bin/pip", line 11, in <module>
load_entry_point('pip==10.0.1', 'console_scripts', 'pip')()
File "/Users/u1790509/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/u1790509/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
return ep.load()
File "/Users/u1790509/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2322, in load
return self.resolve()
File "/Users/u1790509/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2328, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/u1790509/anaconda3/lib/python3.6/site-packages/pip/_internal/__init__.py", line 42, in <module>
from pip._internal import cmdoptions
File "/Users/u1790509/anaconda3/lib/python3.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
from pip._internal.index import (
ImportError: cannot import name 'FormatControl'
The same error appears whenever I attempt to install packages using pip. Does anyone have any suggestion for fixing it?
thanks,
Stephen
I was having this issue on systems running older versions of Anaconda and Python. Downgrading pip as per this answer and then upgrading it worked for me.
I ran:
conda install pip==9.0.3
pip install --upgrade pip
Then I was able to install the package I wanted to via pip install ....
I'm not sure what's going on behind the scenes since after downgrading from 10.x to 9.0.3, I still got:
Successfully uninstalled pip-20.0.2
Successfully installed pip-20.3.4
Probably a result of mixing Anaconda and pip for package management, but works for now for legacy purposes.
I'm using python3 and I installed jupyter-notebook running:
$ sudo apt install jupyter-notebook
Now on start when I type "jupyter-notebook" I got the following error:
Traceback (most recent call last):
File "/usr/bin/jupyter-notebook", line 11, in <module>
load_entry_point('notebook==5.2.2', 'console_scripts', 'jupyter-notebook')()
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/home/helias/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/notebook/notebookapp.py", line 43, in <module>
ioloop.install()
File "/usr/lib/python3/dist-packages/zmq/eventloop/ioloop.py", line 210, in install
assert (not ioloop.IOLoop.initialized()) or \
AttributeError: type object 'IOLoop' has no attribute 'initialized'
I solved this installing/updating the library pyzmq, using pip:
pip3 install pyzmq
Note: use just pip if you are using Python2.
If you are using conda, you can run:
conda install -c anaconda pyzmq
So, I'm currently trying to install this package:
pip install git+https://github.com/Rapptz/discord.py#async
Github here: https://github.com/Rapptz/discord.py
but I get this error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-khtOce/aiohttp/setup.py", line 61, in <module>
raise RuntimeError("aiohttp requires Python 3.4.1+")
RuntimeError: aiohttp requires Python 3.4.1+
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-khtOce/aiohttp/
So instead I have tried using pip3 to install the same package, but I'm currently getting a version conflict which I do not know how to solve.
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 9, in <module>
load_entry_point('pip==8.1.1', 'console_scripts', 'pip3')()
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14- py2.7.egg/pkg_resources.py", line 305, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2243, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'pip3') not found
I remember doing this yesterday, and I may have toyed around installing and reinstalling pip, but before, when I tried to install the same package when pip3 was working, I still remember getting the same error, so idk if solving the version conflict will do much.
I think you have a setuptools conflict here which will probably be resolved by updating setuptools.
Try:
pip install setuptools --upgrade
You can remove the previous setuptools installation in case it gives you a problem.
I am trying to install the elastic beanstalk CLI on an EC2 instance (running AMI) using these instructions:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-getting-started.html
I have python 2.7.9 installed, pip and eb. However, when I try to run eb I get the error below. It looks like it is still using python 2.6. How do you fix that?
Thanks!
Traceback (most recent call last):
File "/usr/bin/eb", line 9, in <module>
load_entry_point('awsebcli==3.0.10', 'console_scripts', 'eb')()
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 473, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2568, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2259, in load
['__name__'])
File "/usr/lib/python2.6/site-packages/ebcli/core/ebcore.py", line 23, in <module>
from ..controllers.initialize import InitController
File "/usr/lib/python2.6/site-packages/ebcli/controllers/initialize.py", line 16, in <module>
from ..core.abstractcontroller import AbstractBaseController
File "/usr/lib/python2.6/site-packages/ebcli/core/abstractcontroller.py", line 21, in <module>
from ..core import io, fileoperations, operations
File "/usr/lib/python2.6/site-packages/ebcli/core/operations.py", line 762
vars = {n['OptionName']: n['Value'] for n in settings
^
SyntaxError: invalid syntax
Pip is probably set up with Python 2.6 instead of python 2.7.
pip --version
You can reinstall pip with Python 2.7, then reinstall 2.6
pip uninstall awsebcli
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install awsebcli
I had the same problem, the fix for me was actually to upgrade to latest Beanstalk stack ( eb upgrade ). Note there are downtime etc. So investigate if you can run the latest stack before upgrading.
The "smartest" solution for me was to install python-dev tools
sudo apt install python-dev
found here:
http://ericbenson.azurewebsites.net/deployment-on-aws-elastic-beanstalk-for-ubuntu/
After installing ipython on Windows via pip install ipython, I am unable to run it and receive the following error.
> ipython
Traceback (most recent call last):
File "C:\Python27\scripts\ipython-script.py", line 5, in <module>
from pkg_resources import load_entry_point
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2607, in <module>
parse_requirements(__requires__), Environment()
File "C:\Python27\lib\site-packages\pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pyreadline>=1.7.1
pyreadline was installed when ipython was via pip, but pip freeze shows warnings about the SVN location
> pip freeze
Warning: cannot find svn location for pyreadline==1.7.1.dev-r0
...
ipython==0.13.1
## FIXME: could not find svn URL in dependency_links for this package:
pyreadline==1.7.1.dev-r0
...
The solution was to uninstall the version of pyreadline pulled when ipython was installed (pip uninstall pyreadline) and download and install pyreadline-1.7.1.win32-py2.7.exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyreadline