feross / SpoofMAC

:briefcase: Change your MAC address for debugging
https://feross.org/spoofmac/
3.02k stars 271 forks source link

Error when using spoof-mac.py #39

Closed Hiddenus closed 9 years ago

Hiddenus commented 9 years ago

Hello.

I found your script and installed it, but I'm unable to use it, because it gives me some kind of error which I don't understand. First I downloaded packed version manualy which is in tar.gz and unpacked it. Installed it using python 2.7.9 with sudo's help (otherwise I'd get access denied) and tried spoof-mac.py --help, but got an error. I thought I must do something more so I wrote those commands for Startup Installation Instructions, yet this error occurs anyway. Everytime it's the same error:

89-24-232-109:bin stsiddenus$ spoof-mac.py Traceback (most recent call last): File "/usr/local/bin/spoof-mac.py", line 5, in pkg_resources.run_script('SpoofMAC==2.0.0', 'spoof-mac.py') File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 442, in run_script self.require(requires)[0].run_script(script_name, ns) File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 1167, in run_script exec script_code in namespace, namespace File "/usr/local/bin/spoof-mac.py", line 29, in

File "build/bdist.macosx-10.5-ppc/egg/spoofmac/init.py", line 3, in File "/Library/Python/2.5/site-packages/SpoofMAC-2.0.0-py2.5.egg/spoofmac/interface.py", line 264 except WindowsError as err: ^ SyntaxError: invalid syntax

I also tried installing it via pip install SpoofMac, but I still get same error. What did I do wrong? Specifications: Python 2.7.9 OSX 10.5.8 PowerPC G4 eMac

Thanks in advance. :)

pteek commented 9 years ago

Incompatibility problem with python 2.

You need to use Python 3.x for now, as we look into fixing this.

pteek commented 9 years ago

Try my master branch at https://github.com/pteek/SpoofMAC. If all is well, I'll merge here.

feross commented 9 years ago

@pteek Lmk when you want me to do a release. I think feross/master has changed quite a bit and we haven't done a release.

pteek commented 9 years ago

10-4

feross commented 9 years ago

@pteek can you just merge? let's do a release. there have been many fixes since 2.0.0.

asmeurer commented 9 years ago

@Hiddenus you're not running 2.7 you're running the system Python, which is 2.5, which is too old to support the syntax needed to support Python 3. You should avoid using the system Python on OS X.

asmeurer commented 9 years ago

@pteek you should use branches on your fork instead of committing to master.

pteek commented 9 years ago

@asmeurer I know ;)

pteek commented 9 years ago

@feross The last commit doesn't do much. Let's do a release with the current master. We can fix minor stuff later.

Hiddenus commented 9 years ago

I thought I can update to Python 3.x since I saw only versions for Intel Macs. :| I'll download & install newest 3.x version I can get, but I wonder how I'm suppose to make it use this newer version? Teachers taught me solving simple problems of Windows not OSX :(

Hiddenus commented 9 years ago

I've done small research and I read that changing version of python from 2.x to 3.x in OSX might corrupt some scripts (which ones I don't know, but I'd like to avoid that risk, since reinstallation of OS is very difficult when no DVD-ROM :P). When I tried to run spoof-mac via command: python3 spoof-mac but I got error about no such file or directory. Probably I'd have to change some commands about paths... but as I wrote in previous post, I'm noob within OSX stuff. ;_; And I appologize for double post, but on this old Safari I can't edit my posts.

dustypomerleau commented 9 years ago

@Hiddenus As a general rule you never want to overwrite the system Python (or any other framework) in OS X. Newer versions of Python can coexist with Apple's defaults but you want to keep them compartmentalised (e.g. using HomeBrew): https://www.youtube.com/watch?v=c9LlK2iu7OA

feross commented 9 years ago

Okay, version 2.0.2 is released.