Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ensure_future() not supported on Ubuntu 14.04 #8

Closed
n1koo opened this issue Nov 4, 2016 · 9 comments
Closed

Using ensure_future() not supported on Ubuntu 14.04 #8

n1koo opened this issue Nov 4, 2016 · 9 comments

Comments

@n1koo
Copy link

n1koo commented Nov 4, 2016

This might be design, but usage of ensure_future() (eg. https://github.com/mbevand/silentarmy/blob/master/silentarmy#L105 ) in silentarmy requires Python 3.4.4+ .

Trusty only has up to 3.4.3 available (http://packages.ubuntu.com/trusty-updates/python3.4)

Maybe deprecate support for 14.04 ?

n1ko@orangeminer:~/silentarmy$ ./silentarmy
Traceback (most recent call last):
  File "./silentarmy", line 549, in <module>
    main()
  File "./silentarmy", line 546, in main
    Silentarmy(opts).run()
  File "./silentarmy", line 256, in run
    asyncio.ensure_future(self.reconnect())
AttributeError: 'module' object has no attribute 'ensure_future'
n1ko@orangeminer:~/silentarmy$ python3 --version
Python 3.4.3
@mbevand
Copy link
Owner

mbevand commented Nov 4, 2016

Oh what a bummer! I wanted to support 14.04 and did not think my Python would be incompatible. Oh well I documented it in the readme. I certainly want to try to make 14.04 fully supported.

@n1koo
Copy link
Author

n1koo commented Nov 4, 2016

Seems to work in 14.04 after installing python3.5 manually. Seeing #9 but mining is totally fine and getting +40% boost compared to zogminer so this is pretty huge!

@n1koo
Copy link
Author

n1koo commented Nov 4, 2016

For anyone stumbling upon here looking at the same issue, heres a gist to install deps not available in 14.04 and also edit the silentarmy to use the custom 3.5 rather than 3.4 from system: https://gist.github.com/n1koo/7c0455b674d3c3a9d4cccf53837b270e

@mbevand
Copy link
Owner

mbevand commented Nov 4, 2016

@n1koo Thank you for documenting the workaround in so much details! Also I added a pointer to this github issue: 6a038fe

@lhl
Copy link

lhl commented Nov 5, 2016

Probably should have looked at the issues list earlier, but just in case it helps anyone before mrb gets a chance to review, I have a pending PR: #27 that should get the miner working in 3.3-3.4.3; I've tested on 3.3.6 in Arch but don't have any Ubuntu 14.04 LTS systems so maybe someone can give it a spin overnight and comment in the PR issue if it doesn't work. You can build/compile from https://github.com/lhl/silentarmy which is an up-to-date fork as of right now except for the asyncio backport code.

@mbevand
Copy link
Owner

mbevand commented Nov 6, 2016

Yes I am going to look into lhl's pull request tomorrow.

@PabloCastellano
Copy link

PabloCastellano commented Nov 6, 2016

I confirm that @lhl's branch works fine. I had to revert the sys.path commit and manually copy sa-solver to lib/asyncio though.

@lhl
Copy link

lhl commented Nov 6, 2016

Hmm @PabloCastellano, that's interesting - so you reverted 0863a83?

The reason that I had to swap to sys.path.append() instead of sys.path.insert() is because silentarmy depends on sys.path[0] to assign the sa-solverlocation. By default sys.path[0] is usually ''. Arguably, sa-solver PATH should probably be assigned by setting a HOMEPATH or SOLVERPATH like how I set the LIBPATH with os.path.dirname(os.path.realpath(__file__)), but I was doing my best to design this patch to be the least invasive possible solution.

@mbevand
Copy link
Owner

mbevand commented Nov 7, 2016

This is fixed - SA now requires Python 3.3 or above (instead of 3.5): 62a78cf

So SA works out of the box on Ubuntu 14.04.

@mbevand mbevand closed this as completed Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants