Zeronet: OSX El Capitan: zeronet.py fails on import gevent

Created on 2 Mar 2016  路  20Comments  路  Source: HelloZeroNet/ZeroNet

Hi, I followed the instructions for mac but it fails when attempting to run gevent. Anyone got a suggestion?

MacBook-Pro:ZeroNet-master jarla$ python zeronet.py
- Starting ZeroNet...
Traceback (most recent call last):
  File "zeronet.py", line 15, in main
    import main
  File "src/main.py", line 8, in <module>
    import gevent
ImportError: No module named gevent
Traceback (most recent call last):
  File "zeronet.py", line 60, in <module>
    main()
  File "zeronet.py", line 46, in main
    traceback.print_exc(file=open("log/error.log", "a"))
IOError: [Errno 2] No such file or directory: 'log/error.log'

Most helpful comment

I think i was able to create a bundle for mac, please help me verify it's working: https://github.com/HelloZeroNet/ZeroBundle/releases/download/0.1.1/ZeroBundle-mac-v0.1.1.zip

  • (Close ZeroNet if already running for you)
  • Download, unpack, run ZeroNet(.app)

It should download the latest version from github, start it and open ZeroHello in the browser.

Please also check http://127.0.0.1:43110/Benchmark if everything is ok. (no errors, openssl verify is working, the python version should be 2.7.11)

Thanks!

All 20 comments

Were you at least able to get gevent installed through pip? Also do you have System Integrity Protection disabled?

Thanks for your prompt response!
Gevent seems to have installed nicely. Thanks. Not sure what the System Integrity Protection is but I'll look it up. (There wasn't any information about SIP at the download page.)

$ pip install gevent msgpack-python
Requirement already satisfied (use --upgrade to upgrade): gevent in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): msgpack-python in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.4.7 in /usr/local/lib/python2.7/site-packages (from gevent)

My SIP isn't disabled and from the description here it seems I need to switch if off completely. Which is a little much just to run ZeroNet.
Think I'm going to try this on my Ubuntu 14.04 home machine instead.

please try python -m pip install gevent msgpack-python, maybe the pip command uses different python installation

I have no osx access, so it would be nice if someone could create a easier installation method for mac. Maybe similar to zerobundle for windows where everything is packed up in a zip file, all you need to download, unpack and run zeronet.cmd.

@HelloZeroNet it works, thank you

Apple implemented SIP in OSX 10.11 to help lock down a lot of stuff in the system folders like /usr
http://totalfinder.binaryage.com/system-integrity-protection

@HelloZeroNet If cross platform testing is an issue, one potential solution could be to just release ZeroNet in Docker containers, similar to what nofish has made. It would eliminate the strenuous need to test each build on Windows, OSX, and Linux. The only real drawback would be that individuals would need to learn and setup Docker, but that complication is almost perfectly remedied with Kitematic.

Same problem here. @HelloZeroNet suggestion didn't work. Any other suggestion? Thanks

Thanks, @HelloZeroNet . The command wasn't well received on OSX El Capitan v10.11.3, though:

$ python -m pip install gevent msgpack-python
/usr/bin/python: No module named pip

It did work very, very nicely on Ubuntu 14.04 LTS :)

@jarlarntzen Unless you installed Python using Homebrew, you will have install pip manually from here https://pip.pypa.io/en/stable/installing/. Once you have pip downloaded and installed you will be able to run python -m pip install gevent msgpack-python.

OS X 10.11.3, SIP disabled, additional installation of python in /usr/local, pip-installed gevent & msgpack-python (without the -m option), updated all pip-installed formulas, added zeronet, no problems. Works great (Safari 9.0.3). Also works fine with VPN (OpenVPN via built-in utun.)

I think i was able to create a bundle for mac, please help me verify it's working: https://github.com/HelloZeroNet/ZeroBundle/releases/download/0.1.1/ZeroBundle-mac-v0.1.1.zip

  • (Close ZeroNet if already running for you)
  • Download, unpack, run ZeroNet(.app)

It should download the latest version from github, start it and open ZeroHello in the browser.

Please also check http://127.0.0.1:43110/Benchmark if everything is ok. (no errors, openssl verify is working, the python version should be 2.7.11)

Thanks!

Wow! This works fantastically well!

Thanks @HelloZeroNet

Benchmarking ZeroNet 0.3.6 (rev949) Python 2.7.11 |Anaconda 2.5.0 (x86_64)| (default, Dec 6 2015, 18:57:58) [GCC 4.2.1 (Apple Inc. build 5577)] on: darwin...

CryptBitcoin:
- hdPrivatekey x 10..........0.127s [x5.52: Insane!!]
- sign x 10..........0.066s [x5.34: Insane!!]
- openssl verify x 100..........0.136s [x2.72: WOW]
- pure-python verify x 10..........0.328s [x4.88: Insane!!]

CryptHash:
- sha256 5M x 10..........0.152s [x3.95: Insane!!]
- sha512 5M x 10..........0.110s [x5.44: Insane!!]
- os.urandom(256) x 100 000..........2.067s [x0.31: Ehh]

Msgpack:
- pack 5K x 10 000..........0.258s [x3.02: WOW]
- unpack 5K x 10 000..........0.473s [x2.54: WOW]
- streaming unpack 5K x 10 000..........0.495s [x2.83: WOW]

Db:
- Open x 10..........0.019s [x6.91: Insane!!]
- Insert x 10 x 1000..........0.394s [x2.54: WOW]
- Buffered insert x 100 x 100..........0.770s [x1.69: Fine]
- Total rows in db: 20000
- Indexed query x 1000..........0.116s [x2.16: Fast]
- Not indexed query x 100..........0.409s [x1.47: Fine]
- Like query x 100..........0.796s [x2.26: Fast]

Done. Total: 8.65s

@HelloZeroNet I'd like to argue that this should be the default download for OSX. :+1: Thanks!

https://zeronet.io/ should offer this method by default now.

Fantastic! Thanks! :smile:

https://github.com/HelloZeroNet/ZeroBundle/releases/download/0.1.1/ZeroBundle-mac-v0.1.1.zip

(Close ZeroNet if already running for you)
Download, unpack, run ZeroNet(.app)

run successful ,but how to exit ZeroNet ?

From ZeroNet's web GUI, right?

use the ... menu on ZeroHello

@HelloZeroNet Use ZeroBundle-mac-v0.1.1.zip , It works! thanks~

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sergei-bondarenko picture sergei-bondarenko  路  3Comments

blurHY picture blurHY  路  3Comments

jerry-wolf picture jerry-wolf  路  4Comments

imachug picture imachug  路  3Comments

cxgreat2014 picture cxgreat2014  路  4Comments