-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Compiling the Example ERC20 works just fine via the cli, but when I save in the vscode it fails with this message:
[{
"resource": "/Users/t11s/Desktop/vyper/test.vy",
"owner": "Vyper Compiler",
"severity": 8,
"message": "Error executing vyper:",
"source": "Error executing vyper:\nTraceback (most recent call last):\n File \"/Library/Frameworks/Python.framework/Versions/3.10/bin/vyper\", line 5, in <module>\n from vyper.cli.vyper_compile import _parse_cli_args\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/vyper/__init__.py\", line 1, in <module>\n from vyper.compiler import compile_code, compile_codes # noqa: F401\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/vyper/compiler/__init__.py\", line 4, in <module>\n from vyper.compiler import output\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/vyper/compiler/output.py\", line 7, in <module>\n from vyper.ast import ast_to_dict, parse_natspec\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/vyper/ast/__init__.py\", line 6, in <module>\n from . import nodes, validation\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/vyper/ast/nodes.py\", line 18, in <module>\n from vyper.utils import MAX_DECIMAL_PLACES, SizeLimits, annotate_source_code\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/vyper/utils.py\", line 22, in <module>\n from Crypto.Hash import keccak # type: ignore\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto/Hash/keccak.py\", line 39, in <module>\n _raw_keccak_lib = load_pycryptodome_raw_lib(\"Crypto.Hash._keccak\",\n File \"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto/Util/_raw_api.py\", line 309, in load_pycryptodome_raw_lib\n raise OSError(\"Cannot load native module '%s': %s\" % (name, \", \".join(attempts)))\nOSError: Cannot load native module 'Crypto.Hash._keccak': Not found '_keccak.cpython-310-darwin.so', Cannot load '_keccak.abi3.so': cannot load library '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto/Util/../Hash/_keccak.abi3.so': dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto/Util/../Hash/_keccak.abi3.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto/Util/../Hash/_keccak.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/_keccak.abi3.so' (no such file), '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto/Hash/_keccak.abi3.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/_keccak.abi3.so' (no such file). Additionally, ctypes.util.find_library() did not manage to locate a library called '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto/Util/../Hash/_keccak.abi3.so', Not found '_keccak.so'\n",
"startLineNumber": 5,
"startColumn": 1,
"endLineNumber": 5,
"endColumn": 256
}]
i believe this is because my terminal runs in rosetta mode but vscode will run vyper raw? is there a way i can get the extension to use rosetta as well