I tried to install brownie and I'm getting this error(I'm watching the code academy blockchain, solidity tutorial). I feel like after trying all possibilities I've reached dead end from my side. Please help cause I need to move forward with the tutorial
This is the error I'm getting when trying to install on MAC
Fatal error from pip prevented installation. Full pip output in file:
/Users/rafeliafernandes/.local/pipx/logs/cmd_2023-03-30_08.38.31_pip_errors.log
pip failed to build packages:
bitarray
cytoolz
lru-dict
multidict
psutil
regex
yarl
Some possibly relevant errors from pip install:
error: subprocess-exited-with-error
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/clang' failed with exit code 1
Error installing eth-brownie.
/Users/rafeliafernandes/.local/pipx/logs/cmd_2023-03-30_08.38.31_pip_errors.log shows:
190.2ms (setup:799): 2023-03-30 08:38:31
190.8ms (setup:800): /Users/rafeliafernandes/Library/Python/3.11/bin/pipx install eth-brownie
190.8ms (setup:801): pipx version is 1.2.0
190.9ms (setup:802): Default python interpreter is '/Library/Frameworks/Python.framework/Versions/3.11/bin/python3'
191.8ms (package_name_from_spec:322): Determined package name: eth-brownie
191.8ms (package_name_from_spec:323): Package name determined in 0.0s
192.3ms (run_subprocess:173): running /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m venv --without-pip /Users/rafeliafernandes/.local/pipx/venvs/eth-brownie
266.8ms (run_subprocess:186): stdout:
266.9ms (run_subprocess:188): stderr:
267.0ms (run_subprocess:189): returncode: 0
267.5ms (run_subprocess:173): running /Users/rafeliafernandes/.local/pipx/venvs/eth-brownie/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
313.1ms (run_subprocess:186): stdout: /Users/rafeliafernandes/.local/pipx/venvs/eth-brownie/lib/python3.11/site-packages
313.3ms (run_subprocess:189): returncode: 0
313.7ms (run_subprocess:173): running /Users/rafeliafernandes/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
358.4ms (run_subprocess:186): stdout: /Users/rafeliafernandes/.local/pipx/shared/lib/python3.11/site-packages
358.6ms (run_subprocess:189): returncode: 0
359.2ms (run_subprocess:173): running /Users/rafeliafernandes/.local/pipx/venvs/eth-brownie/bin/python --version
374.4ms (run_subprocess:186): stdout: Python 3.11.2
374.6ms (run_subprocess:188): stderr:
374.6ms (run_subprocess:189): returncode: 0
375.0ms (_parsed_package_to_package_or_url:147): cleaned package spec: eth-brownie
375.7ms (run_subprocess:173): running /Users/rafeliafernandes/.local/pipx/venvs/eth-brownie/bin/python -m pip install eth-brownie
64916.4ms (run_subprocess:189): returncode: 1
64917.7ms (subprocess_post_check_handle_pip_error:335): '/Users/rafeliafernandes/.local/pipx/venvs/eth-brownie/bin/python -m pip install eth-brownie' failed
64918.8ms (subprocess_post_check_handle_pip_error:352): Fatal error from pip prevented installation. Full pip output in file:
/Users/rafeliafernandes/.local/pipx/logs/cmd_2023-03-30_08.38.31_pip_errors.log
64922.8ms (analyze_pip_output:298): pip failed to build packages:
bitarray
cytoolz
lru-dict
multidict
psutil
regex
yarl
64923.3ms (rmdir:55): removing directory /Users/rafeliafernandes/.local/pipx/venvs/eth-brownie
64925.5ms (cli:866): PipxError: Error installing eth-brownie.
Traceback (most recent call last):
File "/Users/rafeliafernandes/Library/Python/3.11/lib/python/site-packages/pipx/main.py", line 863, in cli
return run_pipx_command(parsed_pipx_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rafeliafernandes/Library/Python/3.11/lib/python/site-packages/pipx/main.py", line 214, in run_pipx_command
return commands.install(
^^^^^^^^^^^^^^^^^
File "/Users/rafeliafernandes/Library/Python/3.11/lib/python/site-packages/pipx/commands/install.py", line 60, in install
venv.install_package(
File "/Users/rafeliafernandes/Library/Python/3.11/lib/python/site-packages/pipx/venv.py", line 253, in install_package
raise PipxError(
pipx.util.PipxError: Error installing eth-brownie.
64929.3ms (cli:874): pipx finished.
The solution for this is to downgrade from python 3.11 to python 3.10 and redo the installation steps as shown on freeCodeCamp.org's Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial