I'm trying to use Prophet from fbprophet but I'm getting this excuciatingly long error message no idea what's suppose to mean? - streamlit

ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"'; file='"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-record-2j0pe0nh/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/fbprophet
cwd: /private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/
Complete output (40 lines):
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/fbprophet
creating build/lib/fbprophet/stan_model
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py", line 122, in
setup(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/init.py", line 165, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py", line 48, in run
build_models(target_dir)
File "/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py", line 38, in build_models
StanBackendEnum.get_backend_class(backend).build_model(target_dir, MODEL_DIR)
File "/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/fbprophet/models.py", line 209, in build_model
import pystan
ModuleNotFoundError: No module named 'pystan'
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"'; file='"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-record-2j0pe0nh/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/fbprophet Check the logs for full command output.

/fbprophet/models.py", line 209, in build_model import pystan ModuleNotFoundError: No module named 'pystan' ---------------------------------------- ERROR: Command errored out with exit status 1
This is your error message. Have you installed pystan ?
If you have and are still getting this error then try uninstalling pystan and install a older version.
I had the same issue and the below worked for me:
Step 1: Uninstall pystan
pip uninstall pystan
Step 2: Install pystan version ~2.14
pip install pystan~=2.14
**Step 3: Try installing fbprophet again **
pip install fbprophet
Reference.

After making sure you have the right python version.
Update apt and install following libraries.
sudo apt update
sudo apt install python3-dev python3-pip python3-venv
use python3 -m pip to install pystan and prophet
python3 -m pip pystan
python3 -m pip prophet

Related

Issue updating packages to update OS - Raspian

Running a pihole on a currently unsupported OS (Raspian 9). I attempted to run a distro upgrade:
apt dist-upgrade -y
However it told me there was an issue with two dependencies:
The following packages have unmet dependencies:
libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb9u1 is installed
sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is installed
I tried running the recommended fix:
'apt --fix-broken install'
Resulting in:
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>:
invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
Traceback (most recent call last):
File "/usr/share/apt-listchanges/DebianFiles.py", line 124, in readdeb
output = subprocess.check_output(command)
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['dpkg-deb', '-f',
'/var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb', 'Package', 'Source',
'Version', 'Architecture', 'Status']' returned non-zero exit status 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 243, in <module>
main(config)
File "/usr/bin/apt-listchanges", line 101, in main
pkg = DebianFiles.Package(deb)
File "/usr/share/apt-listchanges/DebianFiles.py", line 215, in __init__
parser.readdeb(self.path)
File "/usr/share/apt-listchanges/DebianFiles.py", line 128, in readdeb
{'what': file, 'errmsg': str(ex)}) from ex
NameError: name 'file' is not defined
E: Invalid archive member header
E: Prior errors apply to /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg: warning: files list file for package 'libsqlite3-0:armhf' missing; assuming package
has no files currently installed
(Reading database ... 134985 files and directories currently installed.)
Preparing to unpack .../libfreetype6_2.6.3-3.2+deb9u2_armhf.deb ...
Unpacking libfreetype6:armhf (2.6.3-3.2+deb9u2) over (2.6.3-3.2+deb9u1) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libfreetype6_2.6.3-
3.2+deb9u2_armhf.deb (--unpack):
cannot copy extracted data for './usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3' to
'/usr/lib/arm-linux-gnueabihf/libfreetype.so.6.12.3.dpkg-new': unexpected end of file or stream
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>: invalid distance too far back'
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
dpkg-deb: error: subprocess tar returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libfreetype6_2.6.3-3.2+deb9u2_armhf.deb
/var/cache/apt/archives/libsqlite3-0_3.16.2-5+deb9u3_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I attempted the following:
Reconfigure dpkg database
sudo dpkg --configure -a
Force install the software
sudo apt-get install -f
Remove software package
sudo apt-get remove --purge package_name
Remove and overwrite
sudo ls -l /var/lib/dpkg/info | grep -i package_name
sudo mv /var/lib/dpkg/info/package_name.* /tmp
sudo apt-get update
sudo dpkg -i --force-overwrite /var/cache/apt/archives/full_name_of_package
None of this worked.
I tried just manually updating the packages and received dependency errors - the issue is trying to update one results in a dependency error for the other and vice versa:
sqlite3 : Depends: libsqlite3-0 (= 3.16.2-5+deb9u3) but 3.16.2-5+deb9u1 is to b e installed
libfreetype6-dev : Depends: libfreetype6 (= 2.6.3-3.2+deb9u2) but 2.6.3-3.2+deb 9u1 is to be installed
Any idea how to update these two packages when I they apparently require the other one to be updated to update themselves?
Thanks!

pip install ngrok ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

im trying to pip install ngrok but i got the error.
i use ubuntu server
I haven't been able to solve it for hours :(
please help me
pip install ngrok
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py:122: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
Collecting ngrok
Using cached ngrok-0.1.6.tar.gz (3.5 kB)
Collecting ping
Using cached ping-0.2.tar.gz (10 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qanhr0lu/ping/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qanhr0lu/ping/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-qanhr0lu/ping/pip-egg-info
cwd: /tmp/pip-install-qanhr0lu/ping/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qanhr0lu/ping/setup.py", line 23, in <module>
from ping import __version__
File "/tmp/pip-install-qanhr0lu/ping/ping.py", line 196
except socket.error, (errno, msg):
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm not sure which python ngrok library you are trying to install, but I suspect it's probably pyngrok which is installed using: pip install pyngrok
source: https://pyngrok.readthedocs.io/en/latest/index.html

nvidia-pyindex installed unsuccessfully on win10

I want to install tritonclient according to client_libraries.md on win10. Errors happened when I install nvidia-pyindex. How to solve it? Thanks!
(py38trtc250) G:\client_py>pip install --user nvidia-pyindex
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting nvidia-pyindex
Using cached https://mirrors.aliyun.com/pypi/packages/64/4c/dd413559179536b9b7247f15bf968f7e52b5f8c1d2183ceb3d5ea9284776/nvidia-pyindex-1.0.5.tar.gz (6.1 kB)
Building wheels for collected packages: nvidia-pyindex
Building wheel for nvidia-pyindex (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\envs\py38trtc250\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"'; __file__='"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\15151\AppData\Local\Temp\pip-wheel-cho7jhkv'
cwd: C:\Users\15151\AppData\Local\Temp\pip-install-a7e_bahh\nvidia-pyindex\
Complete output (25 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib
creating build\lib\nvidia_pyindex
copying nvidia_pyindex\cmdline.py -> build\lib\nvidia_pyindex
copying nvidia_pyindex\utils.py -> build\lib\nvidia_pyindex
copying nvidia_pyindex\__init__.py -> build\lib\nvidia_pyindex
running egg_info
writing nvidia_pyindex.egg-info\PKG-INFO
writing dependency_links to nvidia_pyindex.egg-info\dependency_links.txt
writing entry points to nvidia_pyindex.egg-info\entry_points.txt
writing top-level names to nvidia_pyindex.egg-info\top_level.txt
reading manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
installing to build\bdist.win-amd64\wheel
running install
'"nvidia_pyindex uninstall"' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error: [WinError 2] 系统找不到指定的文件。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMAND: InstallCommand
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
----------------------------------------
ERROR: Failed building wheel for nvidia-pyindex
Running setup.py clean for nvidia-pyindex
Failed to build nvidia-pyindex
Installing collected packages: nvidia-pyindex
Running setup.py install for nvidia-pyindex ... error
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda\envs\py38trtc250\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"'; __file__='"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\15151\AppData\Local\Temp\pip-record-ma8cx0c0\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\15151\AppData\Roaming\Python\Python38\Include\nvidia-pyindex'
cwd: C:\Users\15151\AppData\Local\Temp\pip-install-a7e_bahh\nvidia-pyindex\
Complete output (7 lines):
running install
'"nvidia_pyindex uninstall"' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error: [WinError 2] 系统找不到指定的文件。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMAND: InstallCommand
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Anaconda\envs\py38trtc250\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"'; __file__='"'"'C:\\Users\\15151\\AppData\\Local\\Temp\\pip-install-a7e_bahh\\nvidia-pyindex\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\15151\AppData\Local\Temp\pip-record-ma8cx0c0\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\15151\AppData\Roaming\Python\Python38\Include\nvidia-pyindex' Check the logs for full command output.

Reconnect minion on a new salt-master causes issues

I'm trying to reconnect minions to my new salt-master.
To do that,
I changed the sources.list
installing the new version of salt-minion (from 2015 to 2017.7.8)
Disconnect the minion from the old salt-master (I had two master to manage the old server because the internal application wasn't
uptodate to run a 2017 version of salt, and one for the uptodate
infrastructure)
I ran rm -r /etc/salt/pki
systemctl force-reload salt-minion.servce
I accepted the key on my new master
I ran salt-call state.sls motd (or whatever the formula)
The point is the following. For few of my minions, I cannot say why, but when I ran the last command salt-call state.sls motd I get this issue:
[ERROR ] An un-handled exception was caught by salt's global exception handler:
KeyError: 'saltutil.is_running'
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 396, in salt_call
client.run()
File "/usr/lib/python2.7/dist-packages/salt/cli/call.py", line 58, in run
caller.run()
File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 134, in run
ret = self.call()
File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 204, in call
ret['return'] = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 1071, in sls
conflict = running(concurrent)
File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 209, in running
active = __salt__['saltutil.is_running']('state.*')
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1121, in __getitem__
func = super(LazyLoader, self).__getitem__(item)
File "/usr/lib/python2.7/dist-packages/salt/utils/lazy.py", line 101, in __getitem__
raise KeyError(key)
KeyError: 'saltutil.is_running'
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 396, in salt_call
client.run()
File "/usr/lib/python2.7/dist-packages/salt/cli/call.py", line 58, in run
caller.run()
File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 134, in run
ret = self.call()
File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 204, in call
ret['return'] = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 1071, in sls
conflict = running(concurrent)
File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 209, in running
active = __salt__['saltutil.is_running']('state.*')
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1121, in __getitem__
func = super(LazyLoader, self).__getitem__(item)
File "/usr/lib/python2.7/dist-packages/salt/utils/lazy.py", line 101, in __getitem__
raise KeyError(key)
KeyError: 'saltutil.is_running'
My salt version:
Salt Version:
Salt: 2017.7.8
Dependency Versions:
cffi: 0.8.6
cherrypy: Not Installed
dateutil: 2.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.3
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
mysql-python: 1.2.3
pycparser: 2.10
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: debian 8.8
locale: UTF-8
machine: x86_64
release: 3.16.0-4-amd64
system: Linux
version: debian 8.8
I tried to uninstall salt-minion with:
apt-get autoremove salt-minion* -y
apt-get purge salt-minion* -y
aptitude purge salt-minion -y
And apt-get update & install salt-minion
But I still have the exact same error. And not on every minions. For some of them, I have the exact same configuration on each server, and it can work for one and not the other.
Any clue? Help :s

Upgrading from IPython 5.x to 6.0 results in crash due to IPython.utils.warn

I recently upgraded from IPython 5.x to 6.0 via condo update ipython. However, I get a crash in the kernel:
Traceback (most recent call last):
File "//anaconda/lib/python3.5/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "//anaconda/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "//anaconda/lib/python3.5/site-packages/ipykernel/__main__.py", line 2, in <module>
from ipykernel import kernelapp as app
File "//anaconda/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 37, in <module>
from .ipkernel import IPythonKernel
File "//anaconda/lib/python3.5/site-packages/ipykernel/ipkernel.py", line 15, in <module>
from .zmqshell import ZMQInteractiveShell
File "//anaconda/lib/python3.5/site-packages/ipykernel/zmqshell.py", line 46, in <module>
from IPython.utils.warn import error
ImportError: No module named 'IPython.utils.warn'
[I 18:35:28.928 NotebookApp] KernelRestarter: restarting kernel (1/5)
Apparently, the issue is that IPython.utils.warn was deprecated and has now been removed as of version 6.0.0. How can I fix this?
Note: none of the following worked:
pip install --upgrade ipython
pip install --upgrade jupyter
pip install --upgrade --no-deps --force-reinstall ipython
pip install --upgrade --no-deps --force-reinstall jupyter
I had the same issue. The following line fixed the issue for me:
conda update ipykernel
I don't know why this is not done automatically.
+1 same problem.
Workaround was to downgrade to the latest available 5.x version of iPython (currently 5.3.0 found via conda search ipython):
conda install ipython=5.3.0
Now Jupyter notebook kernel can start again.

Resources