Does stronghold work with macOS 10.12.6?
bknowles opened this issue ยท 17 comments
I just installed it with pip, and it keeps bombing out:
Traceback (most recent call last):
File "/usr/local/bin/stronghold", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/stronghold.py", line 356, in cli
firewall_config()
File "/usr/local/lib/python2.7/site-packages/stronghold.py", line 106, in firewall_config
if sp.run("sudo -E -v", shell=True, stdout=sp.PIPE).returncode != 0:
AttributeError: 'module' object has no attribute 'run'
Let me do some testing. It haven't tested anything below 10.13.X
, so there may be a problem.
What versions of python are you running? stronghold
requires Python 3
, and will not run with the system python (2.7.10
).
https://stackoverflow.com/a/40590445/8740440
Edit: Yep, this error is happening because the subprocess.run()
function only exists in Python 3.5 and above.
A workaround for now would be to download the repo as a zip and manually execute the file with $ python3 stronghold.py
, or maybe try installing it with $ pip3 install stronghold
(provided you installed python3
with brew
).
This may be due to an issue in my pypi
configuration or setup.py
or something. I'll have to look at this more carefully when I have more time. (Or you can take a look and open a PR if you figure out what's buggy before I have a chance.)
Update: Found the issue, and have an eh fix (that happens to break other things in the pip install process.) Not pushing to master until I get those worked out, but my original problem diagnosis was correct.
Fixes being made in setup.py
.
I have no idea why this is happening though. I can manually install the dependencies successfully, but pip fails to install them with setup.py?
I messed around with it for about an hour and I've got nothing. SO turned up nothing useful, and I'm out of ideas. Check out the commit below if you've got a minute and let me know if you see anything that jumps out at you. @bknowles
WIP on pypi-setup-fixes
branch.
@bknowles Could you test out the newest version (1.4) I released?
Definitely reopen this if it doesn't work. It should force you to run it with Python3, and if you don't have that installed, you'll get a nice error message (not a stack trace.)
Hmm. I just tried installing it again with pip, and it didn't seem to force me to use pip3.
How do I tell what version is installed? Does stronghold understand "--version" syntax?
-info
should give you the version. (I have no idea why I chose -info
over -v
. Will fix.)
Try running: pip3 install stronghold --no-cache-dir
in a virtual env.
I didn't see that in the help output from the version I had, which turned out to be 1.2.
I uninstalled that and re-installed with pip, which got me version 1.3.
Do I need to update pip somehow?
Ahh. pip install --upgrade pip
, which also isn't mentioned anywhere on their --help output.
And now I do finally have stronghold 1.4. Let me do some more testing.
Give me 2 minutes to roll out a new version with the -v
fix.
Fix is up. (v1.4.1
)
Okay, version 1.4 seemed to run to conclusion, without errors. I think it was mostly just enabling stuff I had already set, but I wanted to be sure.
Thanks!
No problem!
I think it was mostly just enabling stuff I had already set, but I wanted to be sure.
Stronghold is designed to run safely on the same system as many times as you'd like. You can never damage a system by re-running it.
Hmm. Pip and pip3 are still finding version 1.4, without the -v change.
Regardless, version 1.4 is now functional for me, so I'm not too worried about 1.4.1.
Thanks again!
Glad I could fix this up!