Closed ammarqureshi closed 5 years ago
I'm not able to reproduce what you're seeing but you might try installing GCC. If you use homebrew, try brew install gcc
, and then pip install web3
again. If that doesn't work you may try installing the Xcode Command Line Tools: xcode-select --install
.
running brew install gcc :
Warning: gcc 8.2.0 is already installed, it's just not linked You can use brew link gcc to link this version.
running brew link gcc :
Linking /usr/local/Cellar/gcc/8.2.0...
Error: Could not symlink bin/gfortran
Target /usr/local/bin/gfortran
already exists. You may want to remove it:
rm '/usr/local/bin/gfortran'
To force the link and overwrite all conflicting files:
brew link --overwrite gcc
To list all files that would be deleted:
brew link --overwrite --dry-run gcc
Also, xcode is up to date
I don't know your setup/dependency tree, but I'd probably try forcing the link or if that doesn't work uninstalling and then installing gcc again.
I installed through brew install gcc
and brew link gcc
. However, this time around I get different errors:
pip freeze
alabaster==0.7.10
anaconda-client==1.6.3
anaconda-navigator==1.6.2
anaconda-project==0.6.0
appdirs==1.4.3
appnope==0.1.0
appscript==1.0.1
arrow==0.10.0
asn1crypto==0.22.0
astroid==1.4.9
astropy==1.3.2
Babel==2.4.0
backports.shutil-get-terminal-size==1.0.0
beautifulsoup4==4.6.0
binaryornot==0.4.4
bitarray==0.8.1
blaze==0.10.1
bleach==1.5.0
bokeh==0.12.5
boto==2.46.1
Bottleneck==1.2.1
breathe==4.9.1
certifi==2018.11.29
cffi==1.10.0
chardet==3.0.3
click==6.6
cloudpickle==0.2.2
clyent==1.2.2
colorama==0.3.9
conda==4.6.3
contextlib2==0.5.5
cookiecutter==1.6.0
cryptography==1.8.1
cycler==0.10.0
Cython==0.25.2
cytoolz==0.8.2
dask==0.14.3
datashape==0.5.4
decorator==4.0.11
distributed==1.16.3
docopt==0.6.2
docutils==0.14
entrypoints==0.2.2
enum34==1.1.6
et-xmlfile==1.0.1
eth-abi==1.3.0
eth-hash==0.2.0
eth-typing==2.0.0
eth-utils==1.4.1
ethpm==0.1.4a10
fastcache==1.0.2
Flask==0.12.2
flask-accept==0.0.6
Flask-Cors==3.0.2
future==0.16.0
gevent==1.2.1
git-spindle==3.4.4
github3.py==0.9.6
gitlint==0.10.0
greenlet==0.4.12
h5py==2.7.1
HeapDict==1.0.0
hexbytes==0.1.0
hidapi==0.7.99.post21
html5lib==0.999
hub==2.0
idna==2.5
imagesize==0.7.1
intelhex==2.2.1
intervaltree==2.1.0
ipfsapi==0.4.3
ipykernel==4.6.1
ipython==5.3.0
ipython-genutils==0.2.0
ipywidgets==6.0.0
isort==4.2.5
itsdangerous==0.24
jdcal==1.3
jedi==0.10.2
Jinja2==2.9.6
jinja2-time==0.2.0
jsonschema==2.6.0
junit2html==22
jupyter==1.0.0
jupyter-client==5.0.1
jupyter-console==5.1.0
jupyter-core==4.3.0
jupyterlab==0.27.0
jupyterlab-launcher==0.6.0
Keras==2.0.6
lazy-object-proxy==1.2.2
llvmlite==0.18.0
locket==0.2.0
lru-dict==1.1.6
lxml==3.7.3
Mako==1.0.7
MarkupSafe==0.23
matplotlib==2.0.2
Mesa==0.8.5
mistune==0.7.4
mock==2.0.0
mpmath==0.19
msgpack-python==0.4.8
multipledispatch==0.4.9
navigator-updater==0.1.0
nbconvert==5.1.1
nbformat==4.3.0
networkx==1.11
nltk==3.2.3
nose==1.3.7
notebook==5.0.0
numba==0.33.0
numexpr==2.6.8
numpy==1.12.1
numpydoc==0.6.0
odo==0.5.0
olefile==0.44
opencv-python==3.4.3.18
openpyxl==2.4.7
packaging==16.8
pandas==0.20.1
pandocfilters==1.4.1
parsimonious==0.8.1
partd==0.3.8
pathlib2==2.2.1
patsy==0.4.1
pbr==3.1.1
pep8==1.7.0
pexpect==4.2.1
pickleshare==0.7.4
Pillow==4.1.1
ply==3.10
poyo==0.4.2
prompt-toolkit==1.0.14
protobuf==3.3.2
psutil==5.2.2
ptyprocess==0.5.1
py==1.4.33
py-solc==3.2.0
pybind11==2.2.4
pycodestyle==2.3.1
pycosat==0.6.3
pycparser==2.17
pycrypto==2.6.1
pycryptodome==3.7.3
pycurl==7.43.0
pydgrid==0.3.2
pyelftools==0.24
pyflakes==1.5.0
Pygments==2.2.0
pygpu==0.6.9
pykwalify==1.7.0
pylint==1.6.4
pyOCD==0.12.0
pyodbc==4.0.16
pyopencl==2018.2
pyOpenSSL==17.0.0
pyparsing==2.1.4
pyserial==3.4
PySocks==1.6.8
pytest==3.0.7
python-dateutil==2.6.0
pytools==2018.5.2
pytz==2017.2
PyWavelets==0.5.2
PyYAML==3.12
pyzmq==16.0.2
QtAwesome==0.4.4
qtconsole==4.3.0
QtPy==1.2.1
requests==2.21.0
rlp==1.1.0
rope-py3k==0.9.4.post1
scikit-image==0.13.0
scikit-learn==0.19.1
scipy==0.19.1
seaborn==0.7.1
semantic-version==2.6.0
sh==1.11
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.10.0
snowballstemmer==1.2.1
socketIO-client==0.7.2
sortedcollections==0.5.3
sortedcontainers==1.5.7
Sphinx==1.7.5
sphinx-rtd-theme==0.4.2
sphinxcontrib-svg2pdfconverter==0.1.0
sphinxcontrib-websupport==1.1.0
spyder==3.2.3
SQLAlchemy==1.1.9
statsmodels==0.8.0
sympy==1.0
tables==3.4.2
tblib==1.3.2
tensorflow==1.0.0
terminado==0.6
testpath==0.3
Theano==0.9.0
toolz==0.8.2
tornado==4.5.1
tqdm==4.30.0
traitlets==4.3.2
unicodecsv==0.14.1
uritemplate==3.0.0
uritemplate.py==3.0.2
urllib3==1.24.1
virtualenv==16.4.0
wcwidth==0.1.7
websocket-client==0.53.0
websockets==6.0
Werkzeug==0.12.2
whelk==2.7.1
whichcraft==0.5.2
widgetsnbextension==2.0.0
wrapt==1.10.10
xlrd==1.0.0
XlsxWriter==0.9.6
xlwings==0.10.4
xlwt==1.2.0
zict==0.1.2
Collecting web3
Using cached https://files.pythonhosted.org/packages/84/7b/8dfe018c0b94a68f88d98ff39c11471ac55ffbcb22cd7ab41010c1476a75/web3-4.8.2-py3-none-any.whl
Requirement already satisfied: eth-abi<2.0.0,>=1.2.0 in ./anaconda/lib/python3.6/site-packages (from web3) (1.3.0)
Requirement already satisfied: lru-dict<2.0.0,>=1.1.6 in ./anaconda/lib/python3.6/site-packages (from web3) (1.1.6)
Requirement already satisfied: eth-utils<2.0.0,>=1.2.0 in ./anaconda/lib/python3.6/site-packages (from web3) (1.4.1)
Requirement already satisfied: websockets<7.0.0,>=6.0.0 in ./anaconda/lib/python3.6/site-packages (from web3) (6.0)
Requirement already satisfied: eth-hash[pycryptodome]<1.0.0,>=0.2.0 in ./anaconda/lib/python3.6/site-packages (from web3) (0.2.0)
Collecting cytoolz<1.0.0,>=0.9.0; implementation_name == "cpython" (from web3)
Collecting eth-account<0.4.0,>=0.2.1 (from web3)
Using cached https://files.pythonhosted.org/packages/a3/d8/6118bc0e00d6ec092bb02b012989d1018893755eb84da53266412ac359e3/eth_account-0.3.0-py3-none-any.whl
Requirement already satisfied: hexbytes<1.0.0,>=0.1.0 in ./anaconda/lib/python3.6/site-packages (from web3) (0.1.0)
Requirement already satisfied: requests<3.0.0,>=2.16.0 in ./anaconda/lib/python3.6/site-packages (from web3) (2.21.0)
Requirement already satisfied: parsimonious<0.9.0,>=0.8.0 in ./anaconda/lib/python3.6/site-packages (from eth-abi<2.0.0,>=1.2.0->web3) (0.8.1)
Requirement already satisfied: eth-typing<3.0.0,>=2.0.0 in ./anaconda/lib/python3.6/site-packages (from eth-abi<2.0.0,>=1.2.0->web3) (2.0.0)
Requirement already satisfied: pycryptodome<4,>=3.6.6; extra == "pycryptodome" in ./anaconda/lib/python3.6/site-packages (from eth-hash[pycryptodome]<1.0.0,>=0.2.0->web3) (3.7.3)
Requirement already satisfied: toolz>=0.8.0 in ./anaconda/lib/python3.6/site-packages (from cytoolz<1.0.0,>=0.9.0; implementation_name == "cpython"->web3) (0.8.2)
Collecting eth-rlp<1,>=0.1.2 (from eth-account<0.4.0,>=0.2.1->web3)
Using cached https://files.pythonhosted.org/packages/56/4b/b309fb44dd9bb975e84f3d626392eec1eeed0108e55a51cd7dd8956a73ad/eth_rlp-0.1.2-py3-none-any.whl
Collecting attrdict<3,>=2.0.0 (from eth-account<0.4.0,>=0.2.1->web3)
Using cached https://files.pythonhosted.org/packages/ef/97/28fe7e68bc7adfce67d4339756e85e9fcf3c6fd7f0c0781695352b70472c/attrdict-2.0.1-py2.py3-none-any.whl
Collecting eth-keys<0.3.0,>=0.2.0b3 (from eth-account<0.4.0,>=0.2.1->web3)
Using cached https://files.pythonhosted.org/packages/3e/4f/a11b4624b4e5d346fd512d190c0d7410ac8c384ef1cb8b681cc4164a26d8/eth_keys-0.2.1-py3-none-any.whl
Collecting eth-keyfile<0.6.0,>=0.5.0 (from eth-account<0.4.0,>=0.2.1->web3)
Using cached https://files.pythonhosted.org/packages/eb/a5/3615d100b62fbf20fe5d5c0d1d4d7326eac861d260b0cd2a36af2bf8ccb1/eth_keyfile-0.5.1-py3-none-any.whl
Requirement already satisfied: idna<2.9,>=2.5 in ./anaconda/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (2.5)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./anaconda/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (1.24.1)
Requirement already satisfied: certifi>=2017.4.17 in ./anaconda/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (2018.11.29)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./anaconda/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (3.0.3)
Requirement already satisfied: six>=1.9.0 in ./anaconda/lib/python3.6/site-packages (from parsimonious<0.9.0,>=0.8.0->eth-abi<2.0.0,>=1.2.0->web3) (1.10.0)
Requirement already satisfied: rlp<2,>=0.6.0 in ./anaconda/lib/python3.6/site-packages (from eth-rlp<1,>=0.1.2->eth-account<0.4.0,>=0.2.1->web3) (1.1.0)
ethpm 0.1.4a10 has requirement web3[tester]<6,>=5.0.0a3, but you'll have web3 4.8.2 which is incompatible.
Installing collected packages: cytoolz, eth-rlp, attrdict, eth-keys, eth-keyfile, eth-account, web3
Found existing installation: cytoolz 0.8.2
Cannot uninstall 'cytoolz'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
@kclowes I've managed to install web3 on my virtual environment. However, opening a python REPL, I get an error when creating a web3 instance.
>>> import web3
>>> web3
<module 'web3' from '/Users/ammarqureshi/anaconda/envs/env/lib/python3.7/site-packages/web3/__init__.py'>
>>> from web3 import Web3
>>> from web3.contract import ConciseContract
>>> w3 = Web3(Web3.EthereumTesterProvider())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ammarqureshi/anaconda/envs/env/lib/python3.7/site-packages/web3/providers/eth_tester/main.py", line 24, in __init__
from eth_tester import EthereumTester
ModuleNotFoundError: No module named 'eth_tester'
Try pip install eth-tester
@kclower I got that error to disappear. However, running the Contract example code in the documentation gives me
Ammars-MacBook-Pro:Contracts ammarqureshi$ python contract.py
Traceback (most recent call last):
File "contract.py", line 29, in <module>
compiled_sol = compile_source(contract_source_code) # Compiled source code
File "/Users/ammarqureshi/anaconda/lib/python3.6/site-packages/solc/main.py", line 108, in compile_source
stdoutdata, stderrdata, command, proc = solc_wrapper(**compiler_kwargs)
File "/Users/ammarqureshi/anaconda/lib/python3.6/site-packages/solc/utils/string.py", line 85, in inner
return force_obj_to_text(fn(*args, **kwargs))
File "/Users/ammarqureshi/anaconda/lib/python3.6/site-packages/solc/wrapper.py", line 169, in solc_wrapper
stderr_data=stderrdata,
solc.exceptions.SolcError: An error occurred during execution
> command: `solc --combined-json abi,asm,ast,bin,bin-runtime,clone-bin,devdoc,interface,opcodes,userdoc`
> return code: `1`
> stderr:
> stdout:
Invalid option to --combined-json: clone-bin
I raised this issue with the solidity guys, and they tell me the error is due "combined-json" way for compiling is not supported. https://github.com/ethereum/solidity/issues/5984 Should I use a previous version of solidity compiler to be able to run the example Contract code or is there a better solution for this?
I think the best solution is to update our docs. I added an issue to do that here. Since it looks like you were able to get through the example on the other thread, please feel free to update the docs if you feel up to it :) Sorry for the confusion! Let me know if this needs to be reopened.
I have that issue with web3 as well. Working in a venv installing web3 gives
ERROR: Command errored out with exit status 1:
command: /home/ahaddad/env1/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0r112nzd/lru-dict/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0r112nzd/lru-dict/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-pip-egg-info-d3hxouy1
cwd: /tmp/pip-install-0r112nzd/lru-dict/
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/ahaddad/env1/lib64/python3.6/site-packages/setuptools/__init__.py", line 18, in <module>
import setuptools.version
File "/home/ahaddad/env1/lib64/python3.6/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/home/ahaddad/env1/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 80, in <module>
import appdirs
ModuleNotFoundError: No module named 'appdirs'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@ahadda5 I'd try in a new virtual environment. Please open a new issue if you're still having problems after trying in a new env. Thanks!
STill there. Could it be WSL file system implementation for opensuse15.2?!
>python3 -m venv envo
source ./envo/bin/activate
>python3 -m pip install ipython
, with no issuespip install web3
gives the following ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available. You should consider upgrading via the '/home/ahaddad/envo/bin/python3 -m pip install --upgrade pip' command.
Is there any appropriate solution??
pip freeze
outputWhat was wrong?
I have setup a clean environment as per the instructions of the official web3 doc. I have already tried the solutions to previous issues on installing web3 but I still get the same error when I run
pip install web3
orpip install -U web3