ethereum / web3.py

A python interface for interacting with the Ethereum blockchain and ecosystem.
http://web3py.readthedocs.io
MIT License
5.01k stars 1.71k forks source link

pip install web3 error #1240

Closed ammarqureshi closed 5 years ago

ammarqureshi commented 5 years ago
certifi==2018.11.29
chardet==3.0.4
eth-hash==0.2.0
eth-typing==2.0.0
idna==2.8
pycryptodome==3.7.3
requests==2.21.0
toolz==0.9.0
urllib3==1.24.1

What 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 or pip install -U web3

Collecting web3
  Using cached https://files.pythonhosted.org/packages/84/7b/8dfe018c0b94a68f88d98ff39c11471ac55ffbcb22cd7ab41010c1476a75/web3-4.8.2-py3-none-any.whl
Collecting websockets<7.0.0,>=6.0.0 (from web3)
  Using cached https://files.pythonhosted.org/packages/0f/d9/e04264525261f352c6d9070f2f69fb83c5df6954aa5c1697b28732a12481/websockets-6.0-cp36-cp36m-macosx_10_6_intel.whl
Requirement already satisfied: requests<3.0.0,>=2.16.0 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from web3) (2.21.0)
Collecting eth-utils<2.0.0,>=1.2.0 (from web3)
  Using cached https://files.pythonhosted.org/packages/91/c8/0ef940843b45377a8d150c94fa8d147607180e89f5d604d3a2be646d9d96/eth_utils-1.4.1-py3-none-any.whl
Requirement already satisfied: eth-hash[pycryptodome]<1.0.0,>=0.2.0 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from web3) (0.2.0)
Collecting hexbytes<1.0.0,>=0.1.0 (from web3)
  Using cached https://files.pythonhosted.org/packages/18/bd/21697d93ee2153c8c12253262b740f571e94341d4cee411504032fff3f56/hexbytes-0.1.0-py3-none-any.whl
Collecting lru-dict<2.0.0,>=1.1.6 (from web3)
  Using cached https://files.pythonhosted.org/packages/00/a5/32ed6e10246cd341ca8cc205acea5d208e4053f48a4dced2b1b31d45ba3f/lru-dict-1.1.6.tar.gz
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
Collecting cytoolz<1.0.0,>=0.9.0; implementation_name == "cpython" (from web3)
  Using cached https://files.pythonhosted.org/packages/36/f4/9728ba01ccb2f55df9a5af029b48ba0aaca1081bbd7823ea2ee223ba7a42/cytoolz-0.9.0.1.tar.gz
Collecting eth-abi<2.0.0,>=1.2.0 (from web3)
  Using cached https://files.pythonhosted.org/packages/e9/ef/5af786a32ae7ac3aece6489400ea2cee6b2ede7a7b3955e6f55a59442d12/eth_abi-1.3.0-py3-none-any.whl
Requirement already satisfied: certifi>=2017.4.17 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (2018.11.29)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from requests<3.0.0,>=2.16.0->web3) (2.8)
Requirement already satisfied: eth-typing<3.0.0,>=1.0.0 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from eth-utils<2.0.0,>=1.2.0->web3) (2.0.0)
Requirement already satisfied: pycryptodome<4,>=3.6.6; extra == "pycryptodome" in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from eth-hash[pycryptodome]<1.0.0,>=0.2.0->web3) (3.7.3)
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-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 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: toolz>=0.8.0 in /Users/ammarqureshi/.venv-py3/lib/python3.6/site-packages (from cytoolz<1.0.0,>=0.9.0; implementation_name == "cpython"->web3) (0.9.0)
Collecting parsimonious<0.9.0,>=0.8.0 (from eth-abi<2.0.0,>=1.2.0->web3)
Collecting six (from attrdict<3,>=2.0.0->eth-account<0.4.0,>=0.2.1->web3)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting rlp<2,>=0.6.0 (from eth-rlp<1,>=0.1.2->eth-account<0.4.0,>=0.2.1->web3)
  Using cached https://files.pythonhosted.org/packages/54/d4/3013691b8c4702cb1c3253be643f2cef12e9bee93e134694e6dab83f41e2/rlp-1.1.0-py2.py3-none-any.whl
Building wheels for collected packages: lru-dict, cytoolz
  Building wheel for lru-dict (setup.py) ... error
  Complete output from command /Users/ammarqureshi/.venv-py3/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-install-fy8o6105/lru-dict/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 /private/var/folders/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-wheel-z4bqm3rv --python-tag cp36:
  running bdist_wheel
  running build
  running build_ext
  building 'lru' extension
  creating build
  creating build/temp.macosx-10.7-x86_64-3.6
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ammarqureshi/anaconda/include -arch x86_64 -I/Users/ammarqureshi/anaconda/include -arch x86_64 -I/Users/ammarqureshi/anaconda/include/python3.6m -c lru.c -o build/temp.macosx-10.7-x86_64-3.6/lru.o
  In file included from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/syslimits.h:7:0,
                   from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/limits.h:34,
                   from /Users/ammarqureshi/anaconda/include/python3.6m/Python.h:11,
                   from lru.c:1:
  /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
   #include_next <limits.h>  /* recurse down to the real one */
                                                               ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for lru-dict
  Running setup.py clean for lru-dict
  Building wheel for cytoolz (setup.py) ... error
  Complete output from command /Users/ammarqureshi/.venv-py3/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-install-fy8o6105/cytoolz/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 /private/var/folders/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-wheel-7ai8jh41 --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.6
  creating build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/compatibility.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/utils_test.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/_version.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/_signatures.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  creating build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
  copying cytoolz/curried/operator.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
  copying cytoolz/curried/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
  copying cytoolz/curried/exceptions.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
  copying cytoolz/itertoolz.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/dicttoolz.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/functoolz.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/recipes.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/utils.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/utils.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/__init__.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/recipes.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/functoolz.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/dicttoolz.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/cpython.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  copying cytoolz/itertoolz.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
  creating build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_none_safe.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_utils.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_curried.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_compatibility.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_embedded_sigs.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_functoolz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_inspect_args.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_doctests.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_tlz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_signatures.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/dev_skip_test.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_recipes.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_docstrings.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_dev_skip_test.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_dicttoolz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_serialization.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_curried_toolzlike.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  copying cytoolz/tests/test_itertoolz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
  running build_ext
  building 'cytoolz.dicttoolz' extension
  creating build/temp.macosx-10.7-x86_64-3.6
  creating build/temp.macosx-10.7-x86_64-3.6/cytoolz
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ammarqureshi/anaconda/include -arch x86_64 -I/Users/ammarqureshi/anaconda/include -arch x86_64 -I/Users/ammarqureshi/anaconda/include/python3.6m -c cytoolz/dicttoolz.c -o build/temp.macosx-10.7-x86_64-3.6/cytoolz/dicttoolz.o
  In file included from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/syslimits.h:7:0,
                   from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/limits.h:34,
                   from /Users/ammarqureshi/anaconda/include/python3.6m/Python.h:11,
                   from cytoolz/dicttoolz.c:17:
  /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
   #include_next <limits.h>  /* recurse down to the real one */
                                                               ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for cytoolz
  Running setup.py clean for cytoolz
Failed to build lru-dict cytoolz
Installing collected packages: websockets, cytoolz, eth-utils, hexbytes, lru-dict, six, attrdict, rlp, eth-rlp, eth-keys, eth-keyfile, eth-account, parsimonious, eth-abi, web3
  Running setup.py install for cytoolz ... error
    Complete output from command /Users/ammarqureshi/.venv-py3/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-install-fy8o6105/cytoolz/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/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-record-ziv562_y/install-record.txt --single-version-externally-managed --compile --install-headers /Users/ammarqureshi/.venv-py3/include/site/python3.6/cytoolz:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.6
    creating build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/compatibility.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/utils_test.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/_version.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/_signatures.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    creating build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
    copying cytoolz/curried/operator.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
    copying cytoolz/curried/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
    copying cytoolz/curried/exceptions.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/curried
    copying cytoolz/itertoolz.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/dicttoolz.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/functoolz.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/recipes.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/utils.pyx -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/utils.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/__init__.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/recipes.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/functoolz.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/dicttoolz.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/cpython.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    copying cytoolz/itertoolz.pxd -> build/lib.macosx-10.7-x86_64-3.6/cytoolz
    creating build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_none_safe.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_utils.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_curried.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_compatibility.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_embedded_sigs.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_functoolz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_inspect_args.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_doctests.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_tlz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_signatures.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/dev_skip_test.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_recipes.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_docstrings.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_dev_skip_test.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_dicttoolz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_serialization.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_curried_toolzlike.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    copying cytoolz/tests/test_itertoolz.py -> build/lib.macosx-10.7-x86_64-3.6/cytoolz/tests
    running build_ext
    building 'cytoolz.dicttoolz' extension
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/cytoolz
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/ammarqureshi/anaconda/include -arch x86_64 -I/Users/ammarqureshi/anaconda/include -arch x86_64 -I/Users/ammarqureshi/anaconda/include/python3.6m -c cytoolz/dicttoolz.c -o build/temp.macosx-10.7-x86_64-3.6/cytoolz/dicttoolz.o
    In file included from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/syslimits.h:7:0,
                     from /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/limits.h:34,
                     from /Users/ammarqureshi/anaconda/include/python3.6m/Python.h:11,
                     from cytoolz/dicttoolz.c:17:
    /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory
     #include_next <limits.h>  /* recurse down to the real one */
                                                                 ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/Users/ammarqureshi/.venv-py3/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-install-fy8o6105/cytoolz/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/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-record-ziv562_y/install-record.txt --single-version-externally-managed --compile --install-headers /Users/ammarqureshi/.venv-py3/include/site/python3.6/cytoolz" failed with error code 1 in /private/var/folders/k_/v5_d__2965s2k45rrtlp_85r0000gn/T/pip-install-fy8o6105/cytoolz/
kclowes commented 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.

ammarqureshi commented 5 years ago

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

kclowes commented 5 years ago

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.

ammarqureshi commented 5 years ago

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.
ammarqureshi commented 5 years ago

@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'
kclowes commented 5 years ago

Try pip install eth-tester

ammarqureshi commented 5 years ago

@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?

kclowes commented 5 years ago

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.

ahadda5 commented 3 years ago

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.
kclowes commented 3 years ago

@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!

ahadda5 commented 3 years ago

STill there. Could it be WSL file system implementation for opensuse15.2?!

Collecting web3 Using cached web3-5.14.0-py3-none-any.whl (467 kB) Collecting typing-extensions<4,>=3.7.4.1; python_version < "3.8" Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB) Collecting lru-dict<2.0.0,>=1.1.6 Using cached lru-dict-1.1.6.tar.gz (9.4 kB) ERROR: Command errored out with exit status 1: command: /home/ahaddad/envo/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9qw6r7i8/lru-dict/setup.py'"'"'; file='"'"'/tmp/pip-install-9qw6r7i8/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-mmjyaqlt cwd: /tmp/pip-install-9qw6r7i8/lru-dict/ Complete output (9 lines): Traceback (most recent call last): File "", line 1, in File "/home/ahaddad/envo/lib64/python3.6/site-packages/setuptools/init.py", line 18, in import setuptools.version File "/home/ahaddad/envo/lib64/python3.6/site-packages/setuptools/version.py", line 1, in import pkg_resources File "/home/ahaddad/envo/lib64/python3.6/site-packages/pkg_resources/init.py", line 80, in 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. 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.

Ngiannakoylis commented 2 years ago

Is there any appropriate solution??