If I try to import brownie in python script I get the following:
Traceback (most recent call last):
File "*filepath*", line 3, in <module>
from brownie import *
ModuleNotFoundError: No module named 'brownie'
If I try to run 'brownie console' i get the following:
INFO: Could not find files for the given pattern(s).
Brownie v1.19.0 - Python development framework for Ethereum
No project was loaded.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'C:\Users\user\AppData\Roaming\npm\node_modules\ganache\dist\node\cli.js'
←[90m at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)←[39m
←[90m at Function.Module._load (node:internal/modules/cjs/loader:778:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)←[39m
←[90m at node:internal/main/run_main_module:17:47←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}
File "C:\Users\user\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "C:\Users\user\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\console.py", line 58, in main
network.connect(CONFIG.argv["network"])
File "C:\Users\user\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\main.py", line 50, in connect
rpc.launch(active["cmd"], **active["cmd_settings"])
File "C:\Users\user\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\rpc\__init__.py", line 76, in launch
self.process = self.backend.launch(cmd, **kwargs)
File "C:\Users\user\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\rpc\ganache.py", line 70, in launch
ganache_version = get_ganache_version(cmd_list[0])
File "C:\Users\user\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\rpc\ganache.py", line 115, in get_ganache_version
raise ValueError("could not read ganache version: {}".format(ganache_version_stdout))
ValueError: could not read ganache version: b''
What could be causing this? I installed brownie using pipx and I was able to run brownie console just yesterday. When I opened VScode this morning it told me to install python extensions and that's what I did, perhaps that messed something up? Any help would be appreciated.