Pyinstaller on ubuntu throws exception PyInstaller.compat.FileNotFoundError - pyinstaller

Running
pyinstaller myfile.spec
Tracebacok below
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 9, in <module>
load_entry_point('PyInstaller==3.0', 'console_scripts', 'pyinstaller')()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/__main__.py", line 99, in run
run_build(opts, spec_file, pyi_config)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/__main__.py", line 47, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **opts.__dict__)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 737, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 680, in build
exec(text, spec_namespace)
File "<string>", line 6, in <module>
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 207, in __init__
self.__postinit__()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/datastruct.py", line 156, in __postinit__
self.assemble()
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/build_main.py", line 430, in assemble
imphook_object.update_dependencies(self.graph)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/imphook.py", line 345, in update_dependencies
self._process_datas(mod_graph)
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/imphook.py", line 313, in _process_datas
self.datas.update(set(format_binaries_and_datas(self._module.datas)))
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/building/utils.py", line 422, in format_binaries_and_datas
src_root_path_or_glob))
PyInstaller.compat.FileNotFoundError: Path or glob "/usr/include/python2.7/pyconfig.h" not found or matches no files.

Pyinstaller needs an Ubuntu package, because it has several dependencies. This is not documented, but you need python-dev:
apt install build-essential python-dev

Related

Apache Airflow on Ubuntu 20.04 not running after fresh install

I followed the steps from Running Airflow on Ubuntu 20.04 (TypeError: required field "type_ignores" missing from Module```), and received the following:
(airflow-uGvev7QO) root#testing2:/opt/airflow# airflow db init
DB: sqlite:////root/airflow/airflow.db
[2021-03-30 21:17:43,978] {db.py:674} INFO - Creating tables
/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3454 SAWarning: relationship 'DagRun.serialized_dag' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning.
/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3454 SAWarning: relationship 'SerializedDagModel.dag_runs' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning.
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/bin/airflow", line 8, in <module>
sys.exit(main())
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/cli/commands/db_command.py", line 31, in initdb
db.initdb()
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/utils/db.py", line 549, in initdb
upgradedb()
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/utils/db.py", line 684, in upgradedb
command.upgrade(config, 'heads')
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/command.py", line 294, in upgrade
script.run_env()
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/base.py", line 490, in run_env
util.load_python_file(self.dir, "env.py")
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 97, in load_python_file
module = load_module_py(module_id, path)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/util/compat.py", line 182, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/migrations/env.py", line 108, in <module>
run_migrations_online()
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/migrations/env.py", line 102, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/runtime/environment.py", line 813, in run_migrations
self.get_context().run_migrations(**kw)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/runtime/migration.py", line 548, in run_migrations
for step in self._migrations_fn(heads, self):
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/command.py", line 283, in upgrade
return script._upgrade_revs(revision, rev)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/base.py", line 365, in _upgrade_revs
revs = list(revs)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/revision.py", line 916, in _iterate_revisions
uppers = util.dedupe_tuple(self.get_revisions(upper))
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/revision.py", line 457, in get_revisions
resolved_id, branch_label = self._resolve_revision_number(id_)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/revision.py", line 640, in _resolve_revision_number
self._revision_map
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/util/langhelpers.py", line 234, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/revision.py", line 156, in _revision_map
for revision in self._generator():
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/base.py", line 115, in _load_revisions
script = Script._from_filename(self, vers, file_)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/script/base.py", line 904, in _from_filename
module = util.load_python_file(dir_, filename)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 97, in load_python_file
module = load_module_py(module_id, path)
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/alembic/util/compat.py", line 182, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py", line 29, in <module>
from airflow.www.app import create_app
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/www/app.py", line 38, in <module>
from airflow.www.extensions.init_views import (
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/www/extensions/init_views.py", line 29, in <module>
from airflow.www.views import lazy_add_provider_discovered_options_to_connection_form
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/www/views.py", line 96, in <module>
from airflow.www import auth, utils as wwwutils
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/airflow/www/utils.py", line 27, in <module>
from flask_appbuilder.models.sqla.interface import SQLAInterface
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 16, in <module>
from sqlalchemy_utils.types.uuid import UUIDType
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py", line 1, in <module>
from .aggregates import aggregated # noqa
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py", line 372, in <module>
from .functions.orm import get_column_key
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py", line 1, in <module>
from .database import ( # noqa
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py", line 11, in <module>
from .orm import quote
File "/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py", line 14, in <module>
from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/root/.local/share/virtualenvs/airflow-uGvev7QO/lib/python3.7/site-packages/sqlalchemy/orm/query.py)
(airflow-uGvev7QO) root#testing2:/opt/airflow#
Advice is welcome.
Thank you
I was able to reproduce the error and the reason seems to be the release of sqlalchemy 1.4 that introduces breaking changes. Airflow by default depends on the latest version of sqlalchemy, but cannot work with version 1.4. A workaround is to downgrade sqlalchem to a version < 1.4.0:
pipenv uninstall sqlalchemy
pipenv install 'sqlalchemy < 1.4.0'
When installing Airflow fresh:
pipenv install 'sqlalchemy < 1.4.0' apache-airflow
Please use below
pip install "apache-airflow[celery]==2.2.2" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.2/constraints-3.6.txt"
It will definitely work.

Graphite Sync Db throws error The SECRET_KEY setting must not be empty

I have installed Graphite in RHEL7 server using the source. I have created a database in Postgresql. Modified the local_settings.py with Postgresql database.
When I execute the below command for sync, it throws an error
PYTHONPATH=/app/graphite/webapp django-admin.py migrate --settings=graphite.settings --run-syncdb
Error :
Traceback (most recent call last): File "/usr/local/bin/django-admin.py", line 4, in <module>
__import__('pkg_resources').run_script('Django==2.2.1', 'django-admin.py') File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1446, in run_script
exec(code, namespace, namespace) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/EGG-INFO/scripts/django-admin.py", line 5, in <module>
management.execute_from_command_line() File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute() File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/base.py", line 361, in execute
self.check() File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/base.py", line 390, in check
include_deployment_checks=include_deployment_checks, File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/commands/migrate.py", line 64, in _run_checks
issues = run_checks(tags=[Tags.database]) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/checks/database.py", line 9, in check_database_backends
for conn in connections.all(): File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/db/utils.py", line 216, in all
return [self[alias] for alias in self] File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/db/utils.py", line 213, in __iter__
return iter(self.databases) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/db/utils.py", line 147, in databases
self._databases = settings.DATABASES File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/conf/__init__.py", line 79, in __getattr__
self._setup(name) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/conf/__init__.py", line 66, in _setup
self._wrapped = Settings(settings_module) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/conf/__init__.py", line 157, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in
_call_with_frames_removed File "/app/graphite/webapp/graphite/settings.py", line 22, in <module>
from django.contrib.contenttypes.models import ContentType File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/contrib/contenttypes/models.py", line 133, in <module>
class ContentType(models.Model): File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/db/models/base.py", line 103, in __new__
app_config = apps.get_containing_app_config(module) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/apps/registry.py", line 252, in get_containing_app_config
self.check_apps_ready() File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/apps/registry.py", line 134, in check_apps_ready
settings.INSTALLED_APPS File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/conf/__init__.py", line 79, in __getattr__
self._setup(name) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/conf/__init__.py", line 66, in _setup
self._wrapped = Settings(settings_module) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/conf/__init__.py", line 176, in __init__
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
The SECRET_KEY is added in local_settings.py, app_settings.py and settings.py. But still it thorws the same error. I have done the fresh installation of graphite and modified the DB values.

Jupyter notebook fail to start kernel

I am new to Jupyter notebook when I try to create a Jupyter notebook, it fail to start the kernel by showing below error message, my python version is 3.5.2 and jupyter version is 4.2.0:
Traceback (most recent call last):
File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 526, in get
value = obj._trait_values[self.name]
KeyError: 'loop'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/base/handlers.py", line 457, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 62, in post
kernel_id=kernel_id))
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_name)
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 326, in wrapper
yielded = next(result)
File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/home/andy/anaconda3/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/home/andy/anaconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 258, in start_kernel
self.start_restarter()
File "/home/andy/anaconda3/lib/python3.5/site-packages/jupyter_client/ioloop/manager.py", line 49, in start_restarter
kernel_manager=self, loop=self.loop,
File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 554, in __get__
return self.get(obj, cls)
File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 533, in get
value = self._validate(obj, dynamic_default())
File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 589, in _validate
value = self.validate(obj, value)
File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 1681, in validate
self.error(obj, value)
File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 1528, in error
raise TraitError(e)
traitlets.traitlets.TraitError: The 'loop' trait of an IOLoopKernelManager instance must be a ZMQIOLoop, but a value of class 'tornado.platform.asyncio.AsyncIOMainLoop' (i.e. <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f1dd34e8ef0>) was specified.
And I have also checked the kernel by using below command:
jupyter kernelspec list
Get below result:
Available kernels:
python3 /home/andy/anaconda3/share/jupyter/kernels/python3
Can anyone help me?
Jupyter 4.2.0 is pretty old, and is not compatible with Tornado versions newer than 5.0. You need to either upgrade to a newer version of Jupyter or downgrade to an older version of Tornado (with pip, this would be pip install "tornado<5.0". I don't know the conda equivalent)

How do you use exclude in salt

I'm trying to use the following block in a salt state
exclude:
- id: nopesir
But this is generating the following stack trace.
Traceback (most recent call last):
File "/bin/salt-call", line 11, in <module> salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 400, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 57, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 134, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 212, in call
ret['return'] = func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 749, in apply_
return highstate(**kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 1055, in highstate
orchestration_jid=orchestration_jid)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 3881, in call_highstate
return self.state.call_high(high, orchestration_jid)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 2693, in call_high
high, req_in_errors = self.requisite_in(high)
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1560, in requisite_in
if not state.startswith('__')]:
AttributeError: 'OrderedDict' object has no attribute 'startswith'
I'm trying to follow the example from the documentation but I must be overlooking something.
I'm using version 2018.3.0.

Ipython requires pymzq but already installed

I am trying to install ipython notebook on my mac OS 10.8.5 but it is telling me that I don't have pyzmq but I have already installed that using sudo pip install, and when I pip freeze, pyzmq is there. I have pyzmq version 14.
How can I fix this problem so that ipython will run in my browser?
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 11, in <module>
sys.exit(start_ipython())
File "/Library/Python/2.7/site-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 563, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/terminal/ipapp.py", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/core/application.py", line 381, in initialize
self.parse_command_line(argv)
File "/Library/Python/2.7/site-packages/IPython/terminal/ipapp.py", line 316, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 475, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/IPython/config/application.py", line 406, in initialize_subcommand
subapp = import_item(subapp)
File "/Library/Python/2.7/site-packages/IPython/utils/importstring.py", line 42, in import_item
module = __import__(package, fromlist=[obj])
File "/Library/Python/2.7/site-packages/IPython/html/notebookapp.py", line 40, in <module>
check_for_zmq('2.1.11', 'IPython.html')
File "/Library/Python/2.7/site-packages/IPython/utils/zmqrelated.py", line 37, in check_for_zmq
raise ImportError("%s requires pyzmq >= %s"%(required_by, minimum_version))
ImportError: IPython.html requires pyzmq >= 2.1.11

Resources