Previously I installed pip packages using sudo pip install package, but I switched to pip install --user package.
The problem is that I installed jupyter-themes using the second method, and when I try to run it the following error gets thrown.
Traceback (most recent call last):
File "/home/aswinmohanme/.local/bin/jt", line 11, in <module>
sys.exit(main())
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/jupyterthemes/__init__.py", line 260, in main
dfonts=args.defaultfonts)
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/jupyterthemes/__init__.py", line 54, in install_theme
from jupyterthemes import stylefx
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/jupyterthemes/stylefx.py", line 7, in <module>
from IPython.core.display import HTML
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/IPython/__init__.py", line 54, in <module>
from .core.application import Application
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/IPython/core/application.py", line 23, in <module>
from traitlets.config.application import Application, catch_config_error
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/traitlets/__init__.py", line 1, in <module>
from .traitlets import *
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/traitlets/traitlets.py", line 60, in <module>
from .utils.importstring import import_item
File "/home/aswinmohanme/.local/lib/python3.5/site-packages/traitlets/utils/importstring.py", line 8, in <module>
from ipython_genutils.py3compat import cast_bytes_py2
ImportError: No module named 'ipython_genutils'
This is the output of pip list installed
...
iniparse (0.4)
ipykernel (4.5.2)
ipython (5.3.0)
ipython-genutils (0.2.0)
ipywidgets (6.0.0)
isort (4.2.5)
...
How do I fix this.
Related
I downgraded Pip from the most recent version using sudo python -m pip install pip==18.0 --upgrade, and now I am receiving the following error when running pip/pip3, including when trying to re-upgrade it using pip3 install --upgrade pip
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 5, in \<module\>
from pip.\_internal import main
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_internal/__init__.py", line 42, in \<module\>
from pip.\_internal import cmdoptions
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_internal/cmdoptions.py", line 16, in \<module\>
from pip.\_internal.index import (
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_internal/index.py", line 14, in \<module\>
from pip.\_vendor import html5lib, requests, six
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_vendor/html5lib/__init__.py", line 25, in \<module\>
from .html5parser import HTMLParser, parse, parseFragment
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_vendor/html5lib/html5parser.py", line 8, in \<module\>
from . import \_tokenizer
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_vendor/html5lib/\_tokenizer.py", line 16, in \<module\>
from .\_trie import Trie
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_vendor/html5lib/\_trie/__init__.py", line 3, in \<module\>
from .py import Trie as PyTrie
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_vendor/html5lib/\_trie/py.py", line 6, in \<module\>
from .\_base import Trie as ABCTrie
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/\_vendor/html5lib/\_trie/\_base.py", line 3, in \<module\>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)
Not sure if there's a specific reason you installed pip 18.0 as it looks incompatible with Python 3.10. It looks like in Python 3.10 collections.Mapping moved to collections.abc.Mapping. I would suggest just completely uninstalling pip and reinstalling, without using pip to do so.
In general, you should try to use the latest version of pip.
i installed brownie with pipx but when i type any command i get this:
Traceback (most recent call last):
File "/Users/lorisfacchinetti/.local/bin/brownie", line 5, in <module>
from brownie._cli.__main__ import main
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/brownie/project/main.py", line 44, in <module>
from brownie.network import web3
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/brownie/network/account.py", line 12, in <module>
import eth_account
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/eth_account/__init__.py", line 1, in <module>
from eth_account.account import ( # noqa: F401
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/eth_account/account.py", line 8, in <module>
from cytoolz import (
File "/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/cytoolz/__init__.py", line 3, in <module>
from .functoolz import *
ImportError: dlopen(/Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/cytoolz/functoolz.cpython-310-darwin.so, 2): Symbol not found: __PyGen_Send
Referenced from: /Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/cytoolz/functoolz.cpython-310-darwin.so
Expected in: flat namespace
in /Users/lorisfacchinetti/.local/pipx/venvs/eth-brownie/lib/python3.10/site-packages/cytoolz/functoolz.cpython-310-darwin.so
i tried to reinstall pipx, brownie, cytoolz but nothing has changed. Has anyone had the same problem?
This works for python 3.1.0
python3 -m pip install --user cython
python3 -m pip install --user cytoolz
python3 -m pip install --user eth-brownie
I was trying to install matplotlib but first I had to install pip in MobaXterm and I think something failed.
I did:
python -m ensurepip
apt-get install python3-pip
Here I didn't want to, but I closed MobaXterm.
Then I tried starting again and I got:
Found package python3-pip
Package python3-pip is already installed, skipping
But then, when I try to install matplotlib:
pip3 install matplotlib
And I got:
Traceback (most recent call last):
File "/bin/pip3", line 7, in <module>
from pip import main
File "/usr/lib/python3.4/site-packages/pip/__init__.py", line 13, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/lib/python3.4/site-packages/pip/utils/__init__.py", line 22, in <module>
from pip._vendor import pkg_resources, six
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources/__init__.py", line 36, in <module>
import plistlib
File "/usr/lib/python3.4/plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "/usr/lib/python3.4/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: No such process
Thank you and sorry, I'm really not an experienced programmer.
I've installed xxhash module with:
sudo pip install --upgrade pip
sudo pip install xxhash
But when I execute:
pydoc modules
I get a list of available modules in which there's no xxhash.
And when I run in terminal a GUI program it gives me an error:
Python: Traceback (most recent call last):
File "./runserver.py", line 34, in <module>
from pogom.search import search_overseer_thread, fake_search_loop
File "/SOME_PATH/resources/app/map/pogom/search.py", line 30, in <module>
from pgoapi import PGoApi
File "/SOME_PATH/resources/app/map/pogom/pgoapi/__init__.py", line 39, in <module>
Python: from .pgoapi import PGoApi
File "/SOME_PATH/resources/app/map/pogom/pgoapi/pgoapi.py", line 34, in <module>
from .rpc_api import RpcApi
File "/SOME_PATH/resources/app/map/pogom/pgoapi/rpc_api.py", line 47, in <module>
from .utilities import to_camel_case, get_time, get_format_time_diff, Rand48, long_to_bytes, generateLocation1, generateLocation2, generateRequestHash, f2i
File "/SOME_PATH/resources/app/map/pogom/pgoapi/utilities.py", line 37, in <module>
import xxhash
ImportError: No module named xxhash
BTW, the 2 first commands worked with no error and when I rerun them it says that these modules are already installed and up to date.
I have the Anaconda distribution of Python 2.7 and I needed to install the Jupyter notebook package. During the installation process my computer turned off and after that I couldn't continue with the process. I tried to uninstall Jupyter and try installing it again, but I keep getting the same error:
Traceback (most recent call last):
File "C:\Users\Acer\Anaconda\Scripts\ipython-script.py", line 3, in <module>
from IPython import start_ipython
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\__init__.py", line 49, in <module>
from .terminal.embed import embed
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\terminal\embed.py", line 19, in <module>
from IPython.terminal.ipapp import load_default_config
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\terminal\ipapp.py", line 22, in <module>
from IPython.core.completer import IPCompleter
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\core\completer.py", line 71, in <module>
from IPython.utils import generics
File "C:\Users\Acer\Anaconda\lib\site-packages\IPython\utils\generics.py", line 8, in <module>
from simplegeneric import generic
ImportError: No module named simplegeneric
What should I remove/add in order to make it work?
You need to install the python package simplegeneric. After you install it, you need to install the next package that you fail to import. Continue this process until you dont get any import errors.