joshvillbrandt / wireless

A dead simple, cross-platform Python library to connect to wireless networks.
https://pypi.org/project/wireless/
Apache License 2.0
83 stars 42 forks source link

Error message on Mac when installing wireless #18

Closed youthfulguru closed 7 years ago

youthfulguru commented 7 years ago

Tried to install wireless and got the following error message: error: could not create '/Library/Python/2.7/site-packages/wireless': Permission denied

joshvillbrandt commented 7 years ago

@youthfulguru, what command did you use to install wireless? Did you include sudo? Without knowing what you tried, my best guess is that you tried to install wireless globally using pip install wireless. I think adding sudo beforehand would fix this.

youthfulguru commented 7 years ago

Thanks for responding. Tried that again and after some collecting, downloading and installing I got this error message ""python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-QYvzqW/wireless/"

joshvillbrandt commented 7 years ago

Does this stack overflow page help you at all?

https://stackoverflow.com/questions/35991403/python-pip-install-gives-command-python-setup-py-egg-info-failed-with-error-c

youthfulguru commented 7 years ago

I believe I'm having trouble upgrading (or installing) setuptools. When I tried sudo pip install wireless I noticed this message at the top:

The directory '/Users/x/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/x/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Does that make a difference? How can I fix that?

joshvillbrandt commented 7 years ago

The first answer on that stack overflow page goes over a few suggestions on installing and upgrading setuptools and related packages. Have you tried those suggestions?

youthfulguru commented 7 years ago

No, when I try to upgrade setuptools I get a long error

Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/init.py", line 267, in renames shutil.move(old, new) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move copytree(src, real_dst, symlinks=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree raise Error, errors Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py', '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py', "[Errno 1] Operation not permitted: '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc', '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc', "[Errno 1] Operation not permitted: '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/var/folders/rp/9pt64y_d11x9dgt8x_cbwmf00000gn/T/pip-QX6BRW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]

joshvillbrandt commented 7 years ago

I'm definitely not qualified to debug setuptools itself. You could try removing Python and setuptools completely and start over maybe?

I think you're on your own from here. :/

youthfulguru commented 7 years ago

Figured it out!

Tried sudo -H pip install --ignore-installed setuptools and that worked. Followed up with pip install ez_setup which also worked. Finally used sudo pip install wireless which worked.

Thanks!

joshvillbrandt commented 7 years ago

Awesome! I'm glad you got it to work. :)