Main > Technical Support

Very slow market buy with pybitshares API

<< < (2/3) > >>

ParadoximA:
After a lot of troubleshooting, I've finally resolved this issue. I believe that many Windows users will encounter the same problem, so here's how to get pybitshares working on a Windows PC:

(Some of these steps are probably unnecessary... but I can't be sure which ones are the most important)

First, install Visual Studio Community 2017 (https://www.visualstudio.com/downloads/)
Even if you've already installed this previously, there are updates that may be required, as new components have been added recently. To do this, search the start menu for "Apps & Features", find Visual Studio Community 2017, and click "update". When that's done, click "modify".
Make sure that you select the "Individual Components" tab, then scroll down to "Components, build tools and runtimes".
These are the components that I have selected (you definitely don't need all of these - but this combination works for me):

    C# and Visual Basic Roslyn compilers
    C++/CLI support
    MSBuild
    Python 2 32-bit (2.7.14)
    Python 2 64-bit (2.7.14)
    Python 3 32-bit (3.6.3)
    Python 3 64-bit (3.6.3)
    VC++ 2015.3 v140 toolset for desktop (x86,x64)
    VC++ 2017 v141 toolset (x86,x64)
    Visual C++ compilers and libraries for ARM
    Visual C++ runtime for UWP
    Visual C++ tools for CMake
    Windows Universal CRT SDK

Once all those are selected, click "Modify".

Then, from the start menu, search for "x64 Native Tools Command Prompt for VS 2017". Right click it, and "Run as administrator" (IMPORTANT!). Then run the following commands:

    pip uninstall bitshares
    pip uninstall pycryptodome
    pip uninstall cryptography
    pip install cryptography
    pip install pycryptodome
    pip install bitshares

You're done! pybitshares should now work correctly!

Why does this work?
I believe that the pycryptodome and/or cryptography installs can be broken if you don't have the correct Visual Studio Compiler Tools installed and added to the PATH environment variable. Any attempt to update these tools later will appear successful, but the initial install remains broken. The type of error messages you will see when you first try to install pybitshares will be similar to:
    "cl.exe failed with exit status 2"
    "error: command 'cl.exe' failed: No such file or directory"
    "Cannot open include file: 'openssl/aes.h': No such file or directory"
    ...and other openssl related errors.

Oddly, with a broken install, all the pybitshares commands will still work - but any command that sends information to the blockchain will take 10 - 20 minutes instead of 1 - 2 seconds.

I hope this helps somebody!

ParadoximA:
Uptick is working, even with the installation errors. I tested a market buy, and it also took 10 - 20 minutes before it showed up on the market and I could use the command line again.

ParadoximA:

--- Quote from: paliboy on July 29, 2017, 08:37:58 pm ---Is it slow when you use Uptick (http://uptick.rocks)?

--- End quote ---
I tried installing uptick to test this, but got errors with the pip install and the manual install, even after installing Visual C++ Build Tools. I'll troubleshoot further tomorrow.

FYI - the last few lines of the failed install:

--- Code: ---Writing C:\Users\xxxxx\AppData\Local\Temp\easy_install-t2ll6vmc\scrypt-0.8.0\setup.cfg
Running scrypt-0.8.0\setup.py -q bdist_egg --dist-dir C:\Users\xxxxx\AppData\Local\Temp\easy_install-t2ll6vmc\scrypt-0.8.0\egg-dist-tmp-rlrb2hdn
scrypt.c
scrypt-1.2.0/lib/crypto\crypto_scrypt.h(33): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
error: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
--- End code ---

ParadoximA:
I haven't tried uptick yet, I'm installing it now. I see it needs Visual C++ Build Tools, this could take a while...

paliboy:
Is it slow when you use Uptick (http://uptick.rocks)?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version