Pip installation error on Ubuntu
See original GitHub issueDescribe the bug The upgrade to mythril 0.18.10 fails on Ubuntu with the following error:
$ pip3 install mythril -U
Collecting mythril
Using cached https://files.pythonhosted.org/packages/ac/c4/a258e1472f29e0866d6a82f320df17b69e1b45e552e7c7cf46194a566e70/mythril-0.18.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qa5hgytb/mythril/setup.py", line 15, in <module>
exec(open(version_path, 'r').read())
TypeError: invalid file: PosixPath('/tmp/pip-install-qa5hgytb/mythril/mythril/version.py')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-qa5hgytb/mythril/
Same error when running setup.py
manually:
ubuntu:~/myth/mythril-0.18.10$ python setup.py
Traceback (most recent call last):
File "setup.py", line 15, in <module>
exec(open(version_path, 'r').read())
TypeError: invalid file: PosixPath('/home/ubuntu/myth/mythril-0.18.10/mythril/version.py')
The file mentioned in the error message exists & is readable though:
$ cat /home/ubuntu/myth/mythril-0.18.10/mythril/version.py
# This file is suitable for sourcing inside POSIX shell, e.g. bash as
# well as for importing into Python
VERSION="v0.18.10" # NOQA
On my Mac, it worked without issues.
@rocky, this might have something to do with the latest changes in #351?
Desktop (please complete the following information):
- OS: Ubuntu 16.04
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
pip install error - python
You are installing pip with sudo but its using your user's home folder's python staging area. This can cause issues later on where...
Read more >[Solved] pip command not found Ubuntu 20.04
The pip command is not found an error raised on your Linux terminal window if the pip is not installed independently on Ubuntu...
Read more >pip not working on ubuntu 18, how to fix that?
When I ran the pip command first, I got error as pip command not found. So, installed it using sudo apt install python-pip....
Read more >Unable to install pip in ubuntu?
Try with this commands: sudo apt-get purge --auto-remove python-pip sudo apt-get update sudo apt-get -y install python-pip curl ...
Read more >pip install on latest ubuntu fails with error · Issue #398
Description: github actions for python 3.8 fails with the following error: ERROR: Invalid requirement: 'Warning: The lock flag' (from line 2 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. I see what’s up. I bet you ran this on Python version 3.5.x (or more precisely < Python 3.6) where
open()
doesn’t accept a Path type.One simple fix is to change:
to:
but perhaps this error has some blessings in disguise. (Or at least I hope you take it that way 😃 )
Previously when I was checking to see if this worked for Pypy, I recall reading that Mythril needs 3.6 or later. Is 3.5 acceptable?
Our setup.py suggest yes here.
However it also says here that Python 2x, 2.7, 3x, 3, and 3.4 are allowed in addition. And no mention of 3.6 or 3.7.
So which versions do we support?
After understanding that, I would be happy to correct all of the parts of setup.py to make them consistent in the next fix.
Thanks.
Closing this as the original issue seems to be fixed. Thanks @johnbender for confirming. Not sure if the mac os thing has been solved, if not feel free to open another issue 😄
@JonHaas Thanks for the info! 👍 Hope that helped with @stuardo3191’s issue. We’re planning on supporting 3.7 as well in the future