Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Update to Python 3 #411

Open
Mikerah opened this issue Oct 10, 2020 · 7 comments
Open

Update to Python 3 #411

Mikerah opened this issue Oct 10, 2020 · 7 comments

Comments

@Mikerah
Copy link

Mikerah commented Oct 10, 2020

I noticed while trying to install oyente that it only seems to work for Python 2 which has been deprecated for a few years. Would it be possible to update the code for oyente to work in a Python 3 environment?

@yxliang01
Copy link
Contributor

The master branch Oyente can run under Python 3 without issue. Although you can see Python 2 syntax, but they are translated when running under Python 3. Can you paste the exact installation steps and error message you saw? I recommend you to build a docker image that is the easiest way to get Oyente working.

@eerkaijun
Copy link

eerkaijun commented Nov 16, 2020

@yxliang01 I've also encountered this error. When I pip install oyente, there's this error code:

Collecting oyente
  Downloading oyente-0.2.7.tar.gz (35 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/kaijun/Documents/oyente-evaluation/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ze2h3ys5/oyente/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ze2h3ys5/oyente/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-60efm66y
         cwd: /tmp/pip-install-ze2h3ys5/oyente/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ze2h3ys5/oyente/setup.py", line 10, in <module>
        long_description=open('README.md').read(),
    FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@yxliang01
Copy link
Contributor

The version on Pypi (installed by pip) is very outdated. You should install from this GitHub Repo and it has been working fine for me and my team members.

@strawberrylady99
Copy link

I hava the same problem,how can I solve it

@wuhongjun15
Copy link

I can't install web3 by using python2, but the other dependencies need python2 rather than python3. What should I do?

@Troublor
Copy link

@yxliang01 When installing from this Repo under python 3.7, the installation works fine, but running oyente shows the following error:

> oyente --help
Traceback (most recent call last):
  File "/home/troublor/workspace/oyente/python3.7/bin/oyente", line 5, in <module>
    from oyente.oyente import main
  File "/home/troublor/workspace/oyente/python3.7/lib/python3.7/site-packages/oyente/oyente.py", line 63
    print "======= error ======="
                                ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("======= error =======")?

@mrx23dot
Copy link

mrx23dot commented Jan 26, 2022

The bottleneck is z3 dependence on python2,
use docker

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

7 participants