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
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 am trying to import following:
from azure.eventhub import EventData
from azure.eventhub.aio import EventHubProducerClient
from azure.eventhub.exceptions import EventHubError
I get error:
from azure.eventhub import EventData
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/__init__.py", line 5, in <module>
from ._common import EventData, EventDataBatch
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/_common.py", line 24, in <module>
from ._utils import (
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/_utils.py", line 33, in <module>
from uamqp import types as uamqp_types
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uamqp/__init__.py", line 12, in <module>
from uamqp import c_uamqp # pylint: disable=import-self
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uamqp/c_uamqp.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_SASToken_CreateString'
>>> from azure.eventhub.aio import EventHubProducerClient
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/__init__.py", line 5, in <module>
from ._common import EventData, EventDataBatch
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/_common.py", line 24, in <module>
from ._utils import (
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/_utils.py", line 33, in <module>
from uamqp import types as uamqp_types
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uamqp/__init__.py", line 12, in <module>
from uamqp import c_uamqp # pylint: disable=import-self
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uamqp/c_uamqp.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_SASToken_CreateString'
>>> from azure.eventhub.exceptions import EventHubError
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/__init__.py", line 5, in <module>
from ._common import EventData, EventDataBatch
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/_common.py", line 24, in <module>
from ._utils import (
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/azure/eventhub/_utils.py", line 33, in <module>
from uamqp import types as uamqp_types
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uamqp/__init__.py", line 12, in <module>
from uamqp import c_uamqp # pylint: disable=import-self
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/uamqp/c_uamqp.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_SASToken_CreateString'
PS- I already did pip install for azure-eventhub. I am running this on Mac M1 machine, with Python: 3.10.6 and pip 22.2.2.
What needs to be fixed/imported to resolve the error?
Try installing uamqp from source instead of wheel/binary.
Remove the eventhub and uamqp libraries first:
pip remove azure-eventhub
pip remove uamqp
Install uamqp from source first:
pip install --no-binary uamqp uamqp
pip install azure-eventhub
This worked for me on my M1. See if this works for you as well.
On Python 3.10 you can update to the latest uamqp package to get Apple M1 support:
pip install -U uamqp
Version 1.6.1 and above will support M1 on Python 3.10 and later
I wanted to provide an update. My team just released a new version of the Event Hubs SDK which is using a new AMQP stack written all in Python and removes the dependency on uamqp. This allows us to support the SDK on multiple platforms with no breaking changes. You can pip install azure-eventhub >= 5.11.0 to get the latest version. For further information please see the announcement and the readme for backwards compatibility with uamqp
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.
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.
I am trying to setup a new virtual env to work with django and flask.
installed
sudo pip install virtualenv
sudo pip install virtualenvwrapper
Then added in .profile these three lines;
export WORKON_HOME=$HOME/Envs
export PROJECT_HOME=$HOME/dev
source /Users/someone/anaconda/bin/virtualenvwrapper.sh
when i try to create a new project through
$ mkproject helloFlask
Error:
someone$ mkproject helloFlask
New python executable in helloFlask/bin/python
Installing setuptools, pip...
Complete output from command /Users/someone/Envs/helloFlask/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/someone/anaconda/lib/python2.7/site-packages/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl/pip/__init__.py", line 6, in <module>
File "/Users/someone/anaconda/lib/python2.7/optparse.py", line 77, in <module>
import textwrap
File "/Users/someone/anaconda/lib/python2.7/textwrap.py", line 10, in <module>
import string, re
File "/Users/someone/anaconda/lib/python2.7/string.py", line 83, in <module>
import re as _re
File "/Users/someone/Envs/helloFlask/lib/python2.7/re.py", line 105, in <module>
import sre_compile
File "/Users/someone/Envs/helloFlask/lib/python2.7/sre_compile.py", line 14, in <module>
import sre_parse
File "/Users/someone/Envs/helloFlask/lib/python2.7/sre_parse.py", line 17, in <module>
from sre_constants import *
File "/Users/someone/Envs/helloFlask/lib/python2.7/sre_constants.py", line 18, in <module>
from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
What I am missing here ?