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 update on Windows fails with 64-bit Python because of missing flask #207

Closed
ghost opened this issue Jul 25, 2014 · 5 comments
Closed

Comments

@ghost
Copy link

ghost commented Jul 25, 2014

I was on 9.31 and it worked OK yesterday.
Today I stopped it and just executed update, now there's a missing dep problem.
Maybe install scripts could check these things?

C:\>cd counterpartyd_build

C:\counterpartyd_build>c:\Python32\python.exe setup.py update
2014-07-25 09:33:13,947|DEBUG: base path: 'C:\counterpartyd_build'
2014-07-25 09:33:13,948|DEBUG: dist path: 'C:\counterpartyd_build\dist'
2014-07-25 09:33:13,948|DEBUG: env path: 'C:\counterpartyd_build\env'
2014-07-25 09:33:13,950|DEBUG: bin path: 'C:\counterpartyd_build\bin'
2014-07-25 09:33:13,950|INFO: Updating relevant Counterparty repos
2014-07-25 09:33:14,085|INFO: Checking out/updating counterpartyd:master from gi
t...
2014-07-25 09:33:14,086|DEBUG: RUNNING COMMAND: cd "C:\counterpartyd_build\dist\
counterpartyd" && git pull origin master
remote: Counting objects: 207, done.
remote: Compressing objects: 100% (110/110), done.
remote: Total 207 (delta 131), reused 143 (delta 97)
Receiving objects: 100% (207/207), 814.64 KiB | 238.00 KiB/s, done.
Resolving deltas: 100% (131/131), done.
From https://github.com/CounterpartyXCP/counterpartyd
 * branch            master     -> FETCH_HEAD
   3ccc44f..189fe81  master     -> origin/master
Updating 3ccc44f..189fe81
Fast-forward
 .gitignore                 |    1 +
 CHANGELOG.md               |   16 +-
 README.md                  |   11 +-
 counterpartyd.py           |  178 +-
 docs/API.rst               |   72 +-
 lib/api.py                 |  203 +--
 lib/bet.py                 |   10 +-
 lib/bitcoin.py             |  100 +-
 lib/blockchain/__init__.py |   27 +
 lib/blockchain/blockr.py   |   90 +
 lib/blockchain/insight.py  |   33 +
 lib/blockchain/sochain.py  |   94 +
 lib/blocks.py              |   23 +-
 lib/broadcast.py           |    4 +-
 lib/config.py              |    2 +-
 lib/issuance.py            |   30 +-
 lib/util.py                |   26 +-
 pip-requirements.txt       |   30 +
 profile.txt                |  Bin 625805 -> 0 bytes
 test/book.mainnet          |    6 -
 test/book.testnet          | 4086 +++++++++++++++++++++++++++++++++++++++++++-
 test/db.dump               |  106 +-
 test/log                   |    2 +-
 version.json               |    6 +-
 24 files changed, 4704 insertions(+), 452 deletions(-)
 create mode 100644 lib/blockchain/__init__.py
 create mode 100644 lib/blockchain/blockr.py
 create mode 100644 lib/blockchain/insight.py
 create mode 100644 lib/blockchain/sochain.py
 create mode 100644 pip-requirements.txt
 delete mode 100644 profile.txt
2014-07-25 09:33:21,667|DEBUG: RUNNING COMMAND: cd "C:\counterpartyd_build" && g
it pull origin master
remote: Counting objects: 78, done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 78 (delta 39), reused 28 (delta 16)
Unpacking objects: 100% (78/78), done.
From https://github.com/CounterpartyXCP/counterpartyd_build
 * branch            master     -> FETCH_HEAD
   89045b4..944f8cb  master     -> origin/master
Updating 89045b4..944f8cb
Fast-forward
 .../linux/init/armory_utxsvr-testnet.conf.template |  15 +
 dist/linux/init/armory_utxsvr.conf.template        |  15 +
 dist/linux/nginx/counterblock.conf                 |   2 +-
 dist/linux/other/audit.rules                       | 159 +++++++++
 dist/linux/other/fail2ban.jail.conf                |   7 +
 dist/linux/other/iwatch.xml                        |  35 ++
 dist/linux/other/sysctl_rules.conf                 |  35 ++
 dist/linux/other/xcpd_security_limits.conf         |   4 +-
 dist/reqs.counterblockd.txt                        |  59 ----
 dist/reqs.txt                                      |  30 --
 docs/SettingUpAFederatedNode.rst                   | 304 +++++++++--------
 run.py                                             |   9 +
 setup.py                                           |  12 +-
 setup_federated_node.py                            | 368 +++++++++++++++------
 14 files changed, 731 insertions(+), 323 deletions(-)
 create mode 100644 dist/linux/init/armory_utxsvr-testnet.conf.template
 create mode 100644 dist/linux/init/armory_utxsvr.conf.template
 create mode 100644 dist/linux/other/audit.rules
 create mode 100644 dist/linux/other/fail2ban.jail.conf
 create mode 100644 dist/linux/other/iwatch.xml
 create mode 100644 dist/linux/other/sysctl_rules.conf
 delete mode 100644 dist/reqs.counterblockd.txt
 delete mode 100644 dist/reqs.txt
2014-07-25 09:33:27,430|INFO: SETUP DONE. (It's time to kick ass, and chew bubbl
egum... and I'm all outta gum.)
2014-07-25 09:33:27,572|INFO: counterpartyd config file already exists at: 'C:\U
sers\ripppler\AppData\Roaming\Counterparty\counterpartyd\counterpartyd.conf'

C:\counterpartyd_build>c:\Python32\python.exe setup.py update

C:\counterpartyd_build>counterpartyd -V

C:\Windows\System32>echo off
Traceback (most recent call last):
  File "C:\counterpartyd_build\dist\counterpartyd\counterpartyd.py", line 21, in
 <module>
    from lib import config, api, util, exceptions, bitcoin, blocks, blockchain
  File "C:\counterpartyd_build\dist\counterpartyd\lib\api.py", line 16, in <modu
le>
    import flask
ImportError: No module named flask

@robby-d
Copy link
Contributor

robby-d commented Jul 25, 2014

try rerunning the setup.py build process. there are new deps. haven't had time to test on windows yet (this is why we need another developer, and why we have a paid opening for one...)

@ghost
Copy link
Author

ghost commented Jul 25, 2014

I'm on it...
CounterpartyXCP/federatednode#49
I know I can re-run setup.py but flask doesn't support Python 3.2 so I had to do more than just that.

Workaround:

  • Uninstall related Python packages, uninstall Python 3.2
  • Install Python 3.3.5 or newer and Counterparty requirements
  • Log out and log back in
  • Run python.exe setup.py in counterpartyd_build directory.

Related:
CounterpartyXCP/federatednode#49

@ghost
Copy link
Author

ghost commented Jul 25, 2014

The above works, but just to get around that particular problem.
Then there's more and more... After several additional steps this is where I stop:

copying tornado\test\test.crt -> build\lib.win-amd64-3.3\tornado\test

copying tornado\test\test.key -> build\lib.win-amd64-3.3\tornado\test

running build_ext

building 'tornado.speedups' extension

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "C:\counterpartyd_build\env\build\tornado\setup.py", line 176, in <module
>

    **kwargs

  File "C:\Python33\Lib\distutils\core.py", line 148, in setup

    dist.run_commands()

  File "C:\Python33\Lib\distutils\dist.py", line 930, in run_commands

    self.run_command(cmd)

  File "C:\Python33\Lib\distutils\dist.py", line 949, in run_command

    cmd_obj.run()

  File "C:\counterpartyd_build\env\lib\site-packages\setuptools\command\install.
py", line 53, in run

    return _install.run(self)

  File "C:\Python33\Lib\distutils\command\install.py", line 569, in run

    self.run_command('build')

  File "C:\Python33\Lib\distutils\cmd.py", line 313, in run_command

    self.distribution.run_command(command)

  File "C:\Python33\Lib\distutils\dist.py", line 949, in run_command

    cmd_obj.run()

  File "C:\Python33\Lib\distutils\command\build.py", line 126, in run

    self.run_command(cmd_name)

  File "C:\Python33\Lib\distutils\cmd.py", line 313, in run_command

    self.distribution.run_command(command)

  File "C:\Python33\Lib\distutils\dist.py", line 949, in run_command

    cmd_obj.run()

  File "C:\counterpartyd_build\env\build\tornado\setup.py", line 85, in run

    build_ext.run(self)

  File "C:\Python33\Lib\distutils\command\build_ext.py", line 353, in run

    self.build_extensions()

  File "C:\Python33\Lib\distutils\command\build_ext.py", line 462, in build_exte
nsions

    self.build_extension(ext)

  File "C:\counterpartyd_build\env\build\tornado\setup.py", line 97, in build_ex
tension

    build_ext.build_extension(self, ext)

  File "C:\Python33\Lib\distutils\command\build_ext.py", line 517, in build_exte
nsion

    depends=ext.depends)

  File "C:\Python33\Lib\distutils\msvc9compiler.py", line 460, in compile

    self.initialize()

  File "C:\Python33\Lib\distutils\msvc9compiler.py", line 371, in initialize

    vc_env = query_vcvarsall(VERSION, plat_spec)

  File "C:\Python33\Lib\distutils\msvc9compiler.py", line 287, in query_vcvarsal
l

    raise ValueError(str(list(result.keys())))

ValueError: ['path']

----------------------------------------
Cleaning up...
Command C:\counterpartyd_build\env\Scripts\python.exe -c "import setuptools;__fi
le__='C:\\counterpartyd_build\\env\\build\\tornado\\setup.py';exec(compile(open(
__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\
users\rippler\appdata\local\temp\pip-mqlx2y-record\install-record.txt --single-
version-externally-managed --install-headers C:\counterpartyd_build\env\include\
site\python3.3 failed with error code 1 in C:\counterpartyd_build\env\build\torn
ado
Storing complete log in C:\Users\rippler\pip\pip.log
2014-07-25 11:47:38,701|ERROR: Command failed: 'C:\counterpartyd_build\env\Scrip
ts\pip.exe install -r C:\counterpartyd_build\dist\counterpartyd\pip-requirements
.txt'

I can cheat and in line 57 of C:\Python33\Lib\distutils\msvc9compiler.py change to x86 instead of x64, that is plain wrong and ends up with linking warnings, however the process completes.

C:\counterpartyd_build>counterpartyd -V
C:\counterpartyd_build>echo off
counterpartyd v9.34.0

I don't even want to try to run this... Next I'l try to build with 32-bit Python.

@ghost
Copy link
Author

ghost commented Jul 25, 2014

32-bit Python worked for me, I built and v9.34 is working fine, so for me acceptable workaround is to install Counterparty on a 32-bit version of Python.
I'll change the title to reflect that there's no problem with the 32-bit Python.

@ghost ghost changed the title setup.py update on Windows fails because of missing flask setup.py update on Windows fails with 64-bit Python because of missing flask Jul 25, 2014
@ghost
Copy link
Author

ghost commented Aug 21, 2014

I wrote a how to here:
https://wiki.counterparty.co/w/Counterparty_with_64-bit_Python_3.4
However currently we recommend to use the 32-bit version Python on any supported Windows.
Because of that I'll close this issue now.

@ghost ghost closed this as completed Aug 21, 2014
This issue was closed.
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

1 participant