eth-brownie installation fails - python

I tried installing eth-brownie and when I execute brownie --version in terminal I get this
File "/Users/yourlogarithm/Library/Python/3.9/bin/brownie", line 5, in <module>
from brownie._cli.__main__ import main
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/project/__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/project/main.py", line 44, in <module>
from brownie.network import web3
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/network/__init__.py", line 4, in <module>
from .account import Accounts
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/network/account.py", line 37, in <module>
from .rpc import Rpc
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/network/rpc/__init__.py", line 16, in <module>
from brownie.network.state import Chain
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/network/state.py", line 23, in <module>
from .transaction import TransactionReceipt
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/brownie/network/transaction.py", line 15, in <module>
import black
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/black/__init__.py", line 13, in <module>
import regex as re
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/regex/__init__.py", line 1, in <module>
from .regex import *
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/regex/regex.py", line 419, in <module>
import regex._regex_core as _regex_core
File "/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/regex/_regex_core.py", line 21, in <module>
import regex._regex as _regex
ImportError: dlopen(/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/regex/_regex.cpython-39-darwin.so, 2): no suitable image found. Did find:
/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/regex/_regex.cpython-39-darwin.so: code signature in (/Users/yourlogarithm/Library/Python/3.9/lib/python/site-packages/regex/_regex.cpython-39-darwin.so) not valid for use in process using Library Validation: Trying to load an unsigned library
I followed the installation guide from here: https://eth-brownie.readthedocs.io/en/stable/install.html

Fixed it by reinstalling regex via pip:
Type in console pip uninstall regex
Type pip install regex

Related

ImportError: cannot import name 'Type' when importing 'gensim"

I want to import the "genism" library. I have previously successfully installed it by typing the following in the command prompt:
pip install gensim
However, the following error appears when importing it:
Traceback (most recent call last):
File "C:/Users/PycharmProjects/untitled/file.py", line 3, in <module>
import gensim
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\gensim\__init__.py", line 5, in <module>
from gensim import parsing, corpora, matutils, interfaces, models, similarities, summarization, utils # noqa:F401
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\gensim\parsing\__init__.py", line 4, in <module>
from .preprocessing import (remove_stopwords, strip_punctuation, strip_punctuation2, # noqa:F401
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\gensim\parsing\preprocessing.py", line 42, in <module>
from gensim import utils
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\gensim\utils.py", line 40, in <module>
import scipy.sparse
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\__init__.py", line 156, in <module>
from . import fft
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\fft\__init__.py", line 76, in <module>
from ._basic import (
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\fft\_basic.py", line 1, in <module>
from scipy._lib.uarray import generate_multimethod, Dispatchable
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\_lib\uarray.py", line 27, in <module>
from ._uarray import *
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\_lib\_uarray\__init__.py", line 114, in <module>
from ._backend import *
File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\_lib\_uarray\_backend.py", line 1, in <module>
from typing import (
ImportError: cannot import name 'Type'
I have also previously successfully installed the "typing" library":
pip install typing
What should I do?
It is because Python 3.5 has its own version typing, and it is incompatible with the installed version of gensim. Upgrade to python3.6 could solve the problem.

Using virtualenv in VSCode gives ImportError: cannot import name 'appdirs' but normal terminal does not

When using virtualenv in VSCode integrated terminal I get the following error when trying to use pip or pip3
Traceback (most recent call last):
File "/home/me/repo/py-hello/venv/bin/pip3", line 5, in <module>
from pip._internal.cli.main import main
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module>
from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
File "/usr/lib/python3/dist-packages/pip/_internal/locations.py", line 19, in <module>
from pip._internal.utils import appdirs
File "/usr/lib/python3/dist-packages/pip/_internal/utils/appdirs.py", line 13, in <module>
from pip._vendor import appdirs as _appdirs
ImportError: cannot import name 'appdirs' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)
However, this isn't the case when using a regular terminal. I can run pip fine.
I found a few mentions in other posts here and here but neither are helping me.

Python ImportError: cannot import name HeaderParsingError when running pip upgrade in virtualenv

Inside the python virtual environment I am unable to install anything via pip.
This is the command I run:
pip install --upgrade pip
The error output:
ImportError: cannot import name HeaderParsingError
The whole traceback is as shown below:
(env)root#ali-Lenovo-G50-80:/home/ali# pip install --upgrade pip
Traceback (most recent call last):
File "/home/ali/env/bin/pip", line 7, in <module>
from pip import main
File "/home/ali/env/local/lib/python2.7/site-packages/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/home/ali/env/local/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/home/ali/env/local/lib/python2.7/site-packages/pip/download.py", line 22, in <module>
from pip._vendor import requests, six
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 58, in <module>
from . import utils
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
from .compat import parse_http_list as _parse_list_header
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/compat.py", line 7, in <module>
from .packages import chardet
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 16, in <module>
from .connectionpool import (
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 33, in <module>
from .connection import (
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 41, in <module>
from .util import (
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py", line 5, in <module>
from .response import is_fp_closed
File "/home/ali/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py", line 4, in <module>
from ..exceptions import HeaderParsingError
ImportError: cannot import name HeaderParsingError
Any help please?

How to install tflearn, Anaconda Ubuntu 16.04

I am using Anaconda on ubuntu 16.04.
I try pip install tflearn on terminal and says ok.
But if I try to check the tflearn version, I receive this log.
I appreciate any hint to solve this issue.
Traceback (most recent call last):
File "/media/libardo/Datos/Proyectos/Libardo/2017/Proyectos/Kaggle/MBA/prueba_TF_Version.py", line 12, in <module>
import tflearn as tfl; print(tfl.__version__)
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tflearn/__init__.py", line 4, in <module>
from . import config
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tflearn/config.py", line 5, in <module>
from .variables import variable
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tflearn/variables.py", line 7, in <module>
from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/__init__.py", line 30, in <module>
from tensorflow.contrib import factorization
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/factorization/__init__.py", line 24, in <module>
from tensorflow.contrib.factorization.python.ops.gmm import *
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/factorization/python/ops/gmm.py", line 27, in <module>
from tensorflow.contrib.learn.python.learn.estimators import estimator
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/__init__.py", line 87, in <module>
from tensorflow.contrib.learn.python.learn import *
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/__init__.py", line 23, in <module>
from tensorflow.contrib.learn.python.learn import *
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/__init__.py", line 25, in <module>
from tensorflow.contrib.learn.python.learn import estimators
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/__init__.py", line 297, in <module>
from tensorflow.contrib.learn.python.learn.estimators.dnn import DNNClassifier
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn.py", line 29, in <module>
from tensorflow.contrib.learn.python.learn.estimators import dnn_linear_combined
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py", line 31, in <module>
from tensorflow.contrib.learn.python.learn.estimators import estimator
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 49, in <module>
from tensorflow.contrib.learn.python.learn.learn_io import data_feeder
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/learn_io/__init__.py", line 21, in <module>
from tensorflow.contrib.learn.python.learn.learn_io.dask_io import extract_dask_data
File "/home/libardo/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/learn_io/dask_io.py", line 26, in <module>
import dask.dataframe as dd
File "/home/libardo/anaconda3/lib/python3.6/site-packages/dask/dataframe/__init__.py", line 3, in <module>
from .core import (DataFrame, Series, Index, _Frame, map_partitions,
File "/home/libardo/anaconda3/lib/python3.6/site-packages/dask/dataframe/core.py", line 38, in <module>
pd.computation.expressions.set_use_numexpr(False)
AttributeError: module 'pandas' has no attribute 'computation'
Maybe the pandas version is old. Try follow the following steps:
https://www.scipy.org/install.html
Another reason for your problem can be due your version of Python, like too the version of your pip. Please, verify if your pip have that libraries with:
pip list
pip2 list
pip3 list
The use of this commands depends your Python and pip version.

In centos - No module named lazy_object_proxy while executing prospector library for python

After installing prospector by using pip install prospector, I execute this command.
prospector --version
I got this error
Traceback (most recent call last):
File "/home/ec2-user/ingestion/acadenv/bin/prospector", line 7, in <module>
from prospector.run import main
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/run.py", line 8, in <module>
from prospector import blender, postfilter, tools
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/tools/__init__.py", line 7, in <module>
from prospector.tools.pylint import PylintTool
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/prospector/tools/pylint/__init__.py", line 6, in <module>
from pylint.config import find_pylintrc
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/pylint/config.py", line 48, in <module>
from pylint import utils
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/pylint/utils.py", line 39, in <module>
from astroid import nodes, Module
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/__init__.py", line 54, in <module>
from astroid.nodes import *
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/nodes.py", line 39, in <module>
from astroid.node_classes import (
File "/home/ec2-user/ingestion/acadenv/local/lib/python2.7/dist-packages/astroid/node_classes.py", line 24, in <module>
import lazy_object_proxy
ImportError: No module named lazy_object_proxy
Moreover I have executed pip install lazy_object_proxy but this does not solve the problem also.

Categories

Resources