Comments (13)
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 ethash.
An even simpler option is to use a prepared fork with all of the above changes:
pip install https://codeload.github.com/Nov1kov/ethash/zip/refs/heads/master
from ethash.
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.
for step 8, you could simply modify version
to 0.1.27
in the setup.py
file within the pyethash-0.1.27
folder
....
setup(
name='pyethash',
author="Matthew Wampler-Doty",
author_email="[email protected]",
license='GPL',
version='0.1.27',
url='https://github.com/ethereum/ethash',
download_url='https://github.com/ethereum/ethash/tarball/v23',
description=('Python wrappers for ethash, the ethereum proof of work'
'hashing function'),
ext_modules=[pyethash],
)
from ethash.
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.
for step 8, you could simply modify
version
to0.1.27
in thesetup.py
file within thepyethash-0.1.27
folder.... setup( name='pyethash', author="Matthew Wampler-Doty", author_email="[email protected]", license='GPL', version='0.1.27', url='https://github.com/ethereum/ethash', download_url='https://github.com/ethereum/ethash/tarball/v23', description=('Python wrappers for ethash, the ethereum proof of work' 'hashing function'), ext_modules=[pyethash], )
Worked fine. Simpler entering the folder and executing python setup.py install ...
from ethash.
Yeah, I also got that error message..plz someone help to fix this problem.
from ethash.
Me too. Anyone have any luck yet?
from ethash.
I'm having the same problem and hoping someone can help. I'm not that great at exceptions, but believe that the issue has something to do with that when the package installer gets to the "io_win32.c" file it fails because it looks for the file in the root directory "Program Files (x86)" and not x64.
Hopefully somebody can help clean that explanation up.
from ethash.
Works for me, too. (python 3.9.7, win11)
Thanks for solutions!
from ethash.
For people coming here after years and suffering. I used Python 3.11 and made the .egg 522abb85a345d4751b43418fd4bc36ee15e6d6c0311ddd8f7f0b7d64cb8681f6 *pyethash-0.1.27-py3.11-win-amd64.egg
https://www.virustotal.com/gui/file/522abb85a345d4751b43418fd4bc36ee15e6d6c0311ddd8f7f0b7d64cb8681f6
pyethash-0.1.27-py3.11-win-amd64.egg.zip
(can't upload .egg directly, check the sha256 hash of the .egg file not the zip for confirmation)
Still don't know why anybody didn't upload it somewhere up until now
from ethash.
Thanks a lot, worked for me (python 3.10, win11)
from ethash.
For people coming here after years and suffering. I used Python 3.11 and made the .egg
522abb85a345d4751b43418fd4bc36ee15e6d6c0311ddd8f7f0b7d64cb8681f6 *pyethash-0.1.27-py3.11-win-amd64.egg
https://www.virustotal.com/gui/file/522abb85a345d4751b43418fd4bc36ee15e6d6c0311ddd8f7f0b7d64cb8681f6 pyethash-0.1.27-py3.11-win-amd64.egg.zip (can't upload .egg directly, check the sha256 hash of the .egg file not the zip for confirmation) Still don't know why anybody didn't upload it somewhere up until now
I am having the same problem I have Python 3.10.
and Windows 11, how do I install the file with the egg extension?
from ethash.
For people coming here after years and suffering. I used Python 3.11 and made the .egg
522abb85a345d4751b43418fd4bc36ee15e6d6c0311ddd8f7f0b7d64cb8681f6 *pyethash-0.1.27-py3.11-win-amd64.egg
https://www.virustotal.com/gui/file/522abb85a345d4751b43418fd4bc36ee15e6d6c0311ddd8f7f0b7d64cb8681f6 pyethash-0.1.27-py3.11-win-amd64.egg.zip (can't upload .egg directly, check the sha256 hash of the .egg file not the zip for confirmation) Still don't know why anybody didn't upload it somewhere up until nowI am having the same problem I have Python 3.10. and Windows 11, how do I install the file with the egg extension?
Not sure if this will work with windows 11 - but this is py 3.10 built on windows 10 - it's the zip file as per @thedogrex's instructions, so you can start at step 7
from ethash.
Uma opção ainda mais simples é usar um garfo preparado com todas as alterações acima:
pip install https://codeload.github.com/Nov1kov/ethash/zip/refs/heads/master
Thanks, perfect
from ethash.
Related Issues (20)
- Add simple instructions for dependencies, build, and install
- Why is ENABLE_SSE disabled? HOT 1
- undefined: crypto.Sha3Hash HOT 1
- Changes for windows HOT 7
- Strange loop
- Stack use after scope
- compile error HOT 2
- using this in a cpp application HOT 2
- Problem with using with Python for Windows. Please adapt compiler options… HOT 3
- Fix version numbers
- Replace this repo with chfast/ethash HOT 1
- not able to make benchmark_full HOT 7
- not able to collect dag
- munmap not delete the right address range
- can't find ethash_params in benchmarl.cpp
- amazon linux: Running setup.py install for pyethash ... error
- test/python/requirements.txt is using pyethereum
- .
- Migrate away from obsolete 'distutils'
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 ethash.