Error nile init on Mac M1
See original GitHub issueI got an error when i run nile init, and i’m not familiar with python , anyone know how to fix this?
Using legacy 'setup.py install' for varint, since package 'wheel' is not installed.
Installing collected packages: varint, netaddr, mypy-extensions, lru-dict, lark-parser, iniconfig, greenlet, frozendict, bitarray, Werkzeug, websockets, typing-extensions, typeguard, toolz, tomli, PyYAML, pyrsistent, pyparsing, pycryptodome, py, protobuf, prometheus-client, pluggy, pipdeptree, parsimonious, numpy, multidict, meinheld, MarkupSafe, itsdangerous, hexbytes, frozenlist, eth-typing, eth-hash, dill, cachetools, base58, attrs, async-timeout, asgiref, yarl, typing-inspect, packaging, multiaddr, jsonschema, Jinja2, cytoolz, aiosignal, pytest, marshmallow, ipfshttpclient, Flask, eth-utils, aiohttp, rlp, pytest-asyncio, marshmallow-oneofschema, marshmallow-enum, marshmallow-dataclass, flask-cors, eth-keys, eth-abi, eth-rlp, eth-keyfile, eth-account, Web3, cairo-lang, starknet-devnet
Running setup.py install for varint ... done
Running setup.py install for lru-dict ... done
Running setup.py install for greenlet ... error
error: subprocess-exited-with-error
× Running setup.py install for greenlet did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running install
/Users/potti/nile-demo/env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.macosx-10.9-universal2-cpython-310
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/opt/homebrew/opt/gmp/include -I/Users/potti/nile-demo/env/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c greenlet.c -o build/temp.macosx-10.9-universal2-cpython-310/greenlet.o
In file included from greenlet.c:359:
In file included from ./slp_platformselect.h:47:
./platform/switch_aarch64_gcc.h:62:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__asm__ volatile ("mov %0, #0" : "=r" (err));
^
./platform/switch_aarch64_gcc.h:62:35: note: use constraint modifier "w"
__asm__ volatile ("mov %0, #0" : "=r" (err));
^~
%w0
greenlet.c:566:10: error: no member named 'use_tracing' in 'struct _ts'
tstate->use_tracing = 0;
~~~~~~ ^
greenlet.c:569:10: error: no member named 'use_tracing' in 'struct _ts'
tstate->use_tracing = (tstate->tracing <= 0 &&
~~~~~~ ^
1 warning and 2 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> greenlet
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Traceback (most recent call last):
File "/Users/potti/nile-demo/env/bin/nile", line 8, in <module>
sys.exit(cli())
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/nile/cli.py", line 69, in init
init_command()
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/nile/core/init.py", line 19, in init
install()
File "/Users/potti/nile-demo/env/lib/python3.10/site-packages/nile/core/install.py", line 10, in install
subprocess.check_call(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/potti/nile-demo/env/bin/python3', '-m', 'pip', 'install', 'cairo-lang', 'starknet-devnet']' returned non-zero exit status 1.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
If an error occurred while updating or installing macOS
The message might say that an error occurred while downloading, preparing, or installing, or that the installer is damaged or could not be ......
Read more >Installing Nile on M1 Mac for Cairo/Starknet - GitHub
Setup project nile init · Compiling a sample contract (in /contracts directory) nile compile · Deploying your contract To Be Updated once I...
Read more >Getting started with OpenZeppelin Contracts for Cairo
For this project, we will install the OpenZeppelin Contracts for Cairo library and Nile—a development environment for Cairo made by OpenZeppelin ...
Read more >PostgreSQL not running on Mac
The problem can also be attributed to a crashed process that left postmaster.pid file behind. $ brew services stop postgresql # adjust path...
Read more >Fix Apps Crashing on M1 Pro/Max Mac After Migration ...
The app crashing problem appears to happen only when attempting to open apps that use Rosetta, the translator that allows Intel apps to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I would add it in the README right after the install step.
We don’t have to do it like this, but this is an example from straknet-devnet README that was helpful to me when I reached the same problem before.
it’s not devnet but Cairo itself. I’m not sure we should be documenting language shortcomings (with or without Nile, you won’t be able to use Cairo with python 3.10). I guess it wouldn’t make any harm either, but where 🤔