Comments (11)
Hi @donal6343 , could you provide more info (OS, installation method, etc). I am able to install ethjsonrpc 0.2.7 from PyPI (pip install ethjsonrpc
) and by cloning the repo and running python setup.py install
.
from ethjsonrpc.
Windows 8, pip install ethjsonrpc
or on the Mac, same issue
from ethjsonrpc.
I think its related to the ethash install https://github.com/ethereum/ethash/blob/master/src/python/core.c
from ethjsonrpc.
The ethash code is C99, which is not well-supported under Windows.
from ethjsonrpc.
Any way to get around this? Really want to install this
from ethjsonrpc.
Back when I was messing with it I converted all of the ethash C99 to C++ (not hard if you are a C++ programmer) but that was not so much for pyethereum as it was for compiling a miner. There are other pyethereum hangups under Windows, if I recall (leveldb seems to me was a problem.)
from ethjsonrpc.
That dependecy (pyethash) seems to be the hangup for me too. I wanted to start relaying for btcrelay but I tried to install pyethash and secp256k1 and both of them are really causing issues. I cloned the pyethash into my venv and tried inputing:
python install setup.py
However, I ran into issues with finding vcvarsall.bat. Is there a fix?
from ethjsonrpc.
@goon034 secp256k1 does cause issues on windows, you should install secp256k1-transient instead (until it gets merged into the secp256k1).
from ethjsonrpc.
Note that under Windows you can skip the c_secp256k1 install (comment it out) and code from the bitcoin package will be used as a fallback.
from ethjsonrpc.
After I struggled with this issue for a long time I realized that ethjsonrpc only uses the utils and abi py files from pyethereum and does not need all the other stuff from there. I have created a branch for my own uses here: https://github.com/LiteID/ethjsonrpc/tree/master/ethjsonrpc that just includes thease files. After looking at the licensing pyethereum code is compatible with ethjsonrpc and could be included.
tldr: we only need some files and you can get a version that works in python 2.7 at lease from https://github.com/LiteID/ethjsonrpc/tree/master/ethjsonrpc (let me know if this is a solution that would work for you guys and I can make a pull request)
from ethjsonrpc.
I think it is x86 / x64 compability error.
I've used python 3.9.0 and these steps worked for me
(with py-evm project on python https://github.com/ethereum/py-evm):
-
Download pyethash 0.1.27:
https://pypi.org/project/pyethash/0.1.27/#files
and unpack archive in lib folder in your project. I've unpacked at/virtualenv/Lib/site-packages/pyethash-0.1.27
folder -
Download ethash from git:
https://github.com/ethereum/ethash -
Copy all files form ethash folder to
/virtualenv/Lib/site-packages/pyethash-0.1.27
-
Change
/pyethash-0.1.27/src/libethash/mmap.h
add this code to the end of file:
#pragma comment(lib, "Shell32.lib")
- Change
pyethash-0.1.27\src\python\core.c
file - replace#include <alloca.h>
by the code:
#if defined(_WIN32) || defined(WIN32)
#include <malloc.h>
#else
#include <alloca.h>
#endif
-
Zip
/virtualenv/Lib/site-packages/pyethash-0.1.27
folder and remove that folder (zip archive will stay). -
Run pip install for new created zip
/virtualenv/Lib/site-packages/pyethash-0.1.27.zip
-
It can conflict with versions: ethash have 0.1.23 version instead of 0.1.27, i just changed my requerements to 0.1.23 and it worked for me. You can try to copy not all files (from ethhash to pyethhash), just files one by one that breaks the compilation.
from ethjsonrpc.
Related Issues (20)
- Use not freezed dependencies HOT 2
- update pypi please HOT 4
- eth_blockNumber() seems to be broken when geth is in --fast mode HOT 4
- is it possible to unlock an account? HOT 1
- fatal error C1083: Cannot open include file: 'alloca.h HOT 1
- Missing 0x prefix for hex data HOT 7
- Integer type must have numerical suffix for uint but not for uint256
- Add examples in README of more complex contract calls
- Lib throws for the call `net_peerCount` HOT 1
- python3 support
- Does not work with Geth 1.6.6 HOT 3
- web3_sha3 not working under Python 2.7 on MacOS HOT 2
- Connecting with Infura support ? HOT 1
- Probably python3 issue: AttributeError: 'bytes' object has no attribute 'encode' HOT 7
- cannot unmarshal hex string without 0x prefix into Go struct HOT 1
- Error send transfer HOT 1
- Unable to successfully sign ethereum transaction offline using TREZORCTL ethereum_sign_tx
- Support for default block parameters.
- So it's abandoned (ethjsonrpc) - i forked it some time ago - but the contributions would be useful.
- Remove trailing 'L' off the string returns from `hex` [Python 2.x] HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethjsonrpc.