Search code examples
pythondjangochatterbot

Django Chatterbot: installation


I built my own chatbot with Chatterbot library, but for local work. Now I want to build it for Telegram but when I try to install packages of Django with pip install django chatterbot, the Terminal shows me this:

Requirement already satisfied: django in /Library/Python/2.7/site-packages
Requirement already satisfied: chatterbot in /Library/Python/2.7/site-packages
Requirement already satisfied: pytz in /Library/Python/2.7/site-packages (from django)
Collecting python-dateutil<2.7,>=2.6 (from chatterbot)
  Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
Requirement already satisfied: nltk<4.0,>=3.2 in /Library/Python/2.7/site-packages (from chatterbot)
Requirement already satisfied: python-twitter<4.0,>=3.0 in /Library/Python/2.7/site-packages (from chatterbot)
Requirement already satisfied: pymongo<4.0,>=3.3 in /Library/Python/2.7/site-packages (from chatterbot)
Requirement already satisfied: jsondatabase<1.0.0,>=0.1.7 in /Library/Python/2.7/site-packages (from chatterbot)
Requirement already satisfied: chatterbot-corpus<1.1,>=1.0 in /Library/Python/2.7/site-packages (from chatterbot)
Requirement already satisfied: sqlalchemy<1.2,>=1.1 in /Library/Python/2.7/site-packages (from chatterbot)
Requirement already satisfied: six>=1.5 in /Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg (from python-dateutil<2.7,>=2.6->chatterbot)
Requirement already satisfied: requests-oauthlib in /Library/Python/2.7/site-packages (from python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: future in /Library/Python/2.7/site-packages (from python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: requests in /Library/Python/2.7/site-packages (from python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: ruamel.yaml<=0.15 in /Library/Python/2.7/site-packages (from chatterbot-corpus<1.1,>=1.0->chatterbot)
Requirement already satisfied: oauthlib>=0.6.2 in /Library/Python/2.7/site-packages (from requests-oauthlib->python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests->python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests->python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests->python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests->python-twitter<4.0,>=3.0->chatterbot)
Requirement already satisfied: ruamel.ordereddict in /Library/Python/2.7/site-packages (from ruamel.yaml<=0.15->chatterbot-corpus<1.1,>=1.0->chatterbot)
Installing collected packages: python-dateutil
  Found existing installation: python-dateutil 1.5
    Uninstalling python-dateutil-1.5:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
    copytree(src, real_dst, symlinks=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
    raise Error, errors
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.py', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.py', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.pyc', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.pyc', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/zoneinfo-2010g.tar.gz', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/zoneinfo-2010g.tar.gz', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/zoneinfo-2010g.tar.gz'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil', '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil', "[Errno 1] Operation not permitted: '/var/folders/mg/psxch1fd5cn9wr1my88302xw0000gn/T/pip-SY8OXR-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil'")]

Why? What am I doing wrong?


Solution

  • Package python-dateutil already installed in your environment. Package manager is trying to uninstall it but has no enough permissions for that operation. You could create an empty environment using virtualenv (https://virtualenv.pypa.io/en/stable/) and install packages in that environment or you could run installation with admin permissions.