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

Setup.py fails #3

Open
jo3l33 opened this issue Jun 1, 2016 · 12 comments
Open

Setup.py fails #3

jo3l33 opened this issue Jun 1, 2016 · 12 comments

Comments

@jo3l33
Copy link

jo3l33 commented Jun 1, 2016

Hi,
first - thank you for this great tool!
second - I am unable to install it, what am I doing wrong ? Thank you in advance for your reply.

pip install setup.py
Collecting setup.py
  Could not find a version that satisfies the requirement setup.py (from versions: )
No matching distribution found for setup.py

Best wishes
j

@Kefkius
Copy link
Member

Kefkius commented Jun 1, 2016

python setup.py install

Pip is for packages that are uploaded somewhere. Running setup.py with python will install Hashmal. Also note that to install it globally (so you can start Hashmal from a terminal in any directory), you'll need to use sudo

And thanks for the compliment btw :)

@jo3l33
Copy link
Author

jo3l33 commented Jun 1, 2016

Thank you very much @Kefkius and sorry for bothering you with this. It truly was a dumb question (I have no experience with Python so I should first read how to install it properly before bothering you :)

Anyway, I might be still doing something wrong because when I run python setup.py install it returns this output:

python setup.py install
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from hashmal_lib.gui_utils import hashmal_entry_points
  File "M:\DEV\projects\python\Hashmal_ide\hashmal_lib\__init__.py", line 3, in <module>
    from PyQt4.QtGui import QApplication
ImportError: No module named PyQt4.QtGui

Does it compile under Win ? Or should I somehow install that PyQt4.QtGui module ? Or install whole Qt for this to work? I am trying to compile in Win 7 x64 with Python 2.7.11.
Thanks again for your help!
And I am looking forward to watching your progress on DCR RFP8 !

@Kefkius
Copy link
Member

Kefkius commented Jun 1, 2016

It's no problem. The issue you're having is that Hashmal requires PyQt4, a GUI library that it depends very heavily on. Here are two links which can probably help for Windows: One Two

They're just the first two Google results from 'pyqt4 windows' - so try that if you still get the above error.

@pr4ct1c
Copy link

pr4ct1c commented Jun 21, 2016

Hi Kefkius
I have similar problem on win (also 7, 64bit), Python 3.4.3, PyQt4 4.11.4.

> git clone https://github.com/mazaclub/hashmal.git
> cd hashmal 
> python setup.py install
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from hashmal_lib.gui_utils import hashmal_entry_points
  File "M:\hashmal\hashmal_lib\__init__.py", line 5, in <module>
    from main_window import HashmalMain
ImportError: No module named 'main_window'

Seems like it can't find main_window module - even that it is there. Any tips ?
Thanks.

@jovialp
Copy link

jovialp commented Feb 13, 2018

You should install python-bitcoinlib and pyparsing, before installing the hashmal

@dnunes
Copy link

dnunes commented Apr 26, 2018

For those having problems with "no module named X", this codebase is meant for Python 2.x and it uses Python 2.x-style imports. For Python 3 it should be "from .main_window", but it would require a large change on loads of files, besides probably other code incompatibilities. Better to simply use Python 2.x altogether for this.

If you're on windows and installed python 2 and python 3, you probably have the Python Launcher and can use py -2 <command>. In this case, run py -2 setup.py and you're good to go.

@dnunes
Copy link

dnunes commented Apr 26, 2018

Here is a list of things to know, specially if you are on windows:

  1. First of all, the python commands on these instructions may need to be replaced with py -2 (on Windows, with both Python 2 and Python 3 installed) or python2 on some linux distributions. Make sure you run <command> --version (like python --version, py -2 --version or python2 --version) first to check the version and are absolutely sure you are using Python 2.x branch as this codebase will not run on Python 3.x, so make sure you have Python 2.x installed and are using it.
  2. run pip install -r requirements.txt (this install python-bitcoinlib and pyparsing) - maybe pip2, depending on your setup.
  3. run pip install requests (the author forgot to put this on requirements.txt file?) - maybe pip2, depending on your setup.
  4. install openssl (for crypto functions).
    On Windows, install from 1.0.x branch (and choose to put dll on windows system directory). You can get a list of places to get precompiled binaries at https://wiki.openssl.org/index.php/Binaries - also, do not forget to get the right architecture (win32 or win64). Failing this will give you "WindowsError: [Error 126] The specified module could not be found". You can check whether you have ssl or not by running python -c "import ctypes; from ctypes.util import find_library; ctypes.cdll.LoadLibrary(find_library('ssl') or 'libeay32');" on your command line. If this gives you and error, then you need to fix your openssl library before running the setup.

After you run these steps you can run python setup.py install and, if the setup runs ok, just run python hashmal.

You're welcome.

@darbehdar
Copy link

Hi there,

I came across 'hashmal' accidentally. So far I've been using the 'bx' tool.
'hashmal' looks very intriguing, if only I could get it to work on my system.

I am running a 32-bit version of Ubuntu 14.04 ( on an Intel clone box )
Issuing 'python --version' returns Python 2.7.6
( Python3 is also installed on said system but 'python' defaults to v2 ( as the above seems to imply ).
Issuing 'python3 --version' returns Python 3.4.3 )

The following commands were issued in preparation

  • sudo pip install bitcoinlib
  • sudo apt-get install python-pyparsing
  • sudo apt install libssl-dev
  • sudo pip install --upgrade requests

Following these within the directory 'hashmal' was unpacked, I then issued

 `sudo python setup.py install`

which returns the following message from python

Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from hashmal_lib.gui_utils import hashmal_entry_points
  File "/home/<use-dir>/hashmal-master/hashmal_lib/__init__.py", line 5, in <module>
    from main_window import HashmalMain
  File "/home/<user-dir>/hashmal-master/hashmal_lib/main_window.py", line 9, in <module>
    from hashmal_lib.core import chainparams
  File "/home/<user-dir>/hashmal-master/hashmal_lib/core/__init__.py", line 1, in <module>
    import chainparams
  File "/home/<user-dir>/hashmal-master/hashmal_lib/core/chainparams.py", line 4, in <module>
    from bitcoin.core.script import (FindAndDelete, SIGHASH_ALL, SIGHASH_NONE,
ImportError: No module named core.script

I would like get 'hashmal' installed and try/use it.

Any feedback is appreciated.

Thanks

@Pyons
Copy link

Pyons commented Jul 16, 2018

@darbehdar You installed the wrong bitcoin library.

You installed: sudo pip install bitcoinlib - https://pypi.org/project/bitcoinlib/
But you should install sudo pip install python-bitcoinlib - https://pypi.org/project/python-bitcoinlib/

These are two different libraries.

Furthermore if you just want to try this program you don't have to install it via setup.py
You can just start the program like this python hashmal - hashmal is the file next to setup.py

@rs4207
Copy link

rs4207 commented Aug 14, 2018

I am on windows 7 64 bit and I did all the things that you told above pip,openssl etc and i successfully installed hashmal but i dont see any icon to open it how i can open hashmal.?

@dfoderick
Copy link

I am on windows 7 64 bit and I did all the things that you told above pip,openssl etc and i successfully installed hashmal but i dont see any icon to open it how i can open hashmal.?

I followed @dnunes instructions.
If everything is working then run the following from a command line

python hashmal

and the program will run

@Kefkius
Copy link
Member

Kefkius commented Sep 24, 2018

@dfoderick Note that I haven't been maintaining or improving this project for some time, and the last I heard about someone doing so was about a year ago. I would like to continue on this because it's still sorely needed IMO, but be wary in the (unspecified amount of) meantime.

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

9 participants