New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied: '/Library/Python/2.7/site-packages/pync/vendor' #1

Closed
greenmang0 opened this Issue Jan 4, 2013 · 26 comments

Comments

@greenmang0

greenmang0 commented Jan 4, 2013

I get following error when I load script.

I am running weechat latest version.

Weechat is installed through brew - brew install weechat
Pync is installed through pip - sudo pip install pync

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/pync/__init__.py", line 3, in <module> from TerminalNotifier import Notifier File "/Library/Python/2.7/site-packages/pync/TerminalNotifier.py", line 117, in <module> Notifier = TerminalNotifier() File "/Library/Python/2.7/site-packages/pync/TerminalNotifier.py", line 24, in __init__ self.download_app() File "/Library/Python/2.7/site-packages/pync/TerminalNotifier.py", line 46, in download_app shutil.move(os.path.join(path_to_folder, "terminal-notifier.app"), self.app_path) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 295, in move copytree(src, real_dst, symlinks=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 174, in copytree os.makedirs(dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs makedirs(head, mode) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode)OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pync/vendor'

@sindresorhus

This comment has been minimized.

Owner

sindresorhus commented Jan 4, 2013

Seems like you don't have permission to the Python folder. Try sudo chown -R $USER /Library/Python/2.7

@greenmang0

This comment has been minimized.

greenmang0 commented Jan 4, 2013

Yeah, but is there any other way? I don't think it's good to change ownership of a folder which is available systemwide. There is a possibility that other apps might misbehave.

@greenmang0

This comment has been minimized.

greenmang0 commented Jan 5, 2013

sudo chown -R $USER /Library/Python/2.7/site-packages/pync did the trick.

@karbon62

This comment has been minimized.

karbon62 commented Aug 18, 2015

Hi

Please can someone help - I am also getting the same error:

Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/commands/install.py", line 299, in run
root=options.root_path,
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py", line 646, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 813, in install
self.move_wheel_files(self.source_dir, root=root)
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_install.py", line 1008, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/wheel.py", line 339, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/wheel.py", line 310, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/utils/init.py", line 70, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/selenium'

I've also tried: sudo chown -R $USER /Library/Python/2.7/site-packages/pync but don't think it has fixed it. I am now getting this: /Library/Python/2.7/site-packages/pync: No such file or directory

@thiagopnts

This comment has been minimized.

Collaborator

thiagopnts commented Aug 18, 2015

Looks like you don't have pync installed, can you try:
sudo pip install pync
then you run the chown

@karbon62

This comment has been minimized.

karbon62 commented Aug 18, 2015

Its fixed, thanks!

@rafaelcamargo

This comment has been minimized.

rafaelcamargo commented Oct 30, 2015

Thanks from here too!

@HeidiW

This comment has been minimized.

HeidiW commented Apr 15, 2016

Thanks x3!!

@MissSharp

This comment has been minimized.

MissSharp commented Apr 18, 2016

@sindresorhus how can I restore from 'sudo chown -R $USER /Library/Python/2.7' ? thanks

@avneechadha

This comment has been minimized.

avneechadha commented Apr 29, 2016

Hi!
Can any one help?

Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/uninstall.py", line 76, in run
requirement_set.uninstall(auto_confirm=options.yes)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 326, in uninstall
req.uninstall(auto_confirm=auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 746, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/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 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/IPython/init.py'

@thiagopnts

This comment has been minimized.

Collaborator

thiagopnts commented Apr 30, 2016

@Avnikaur it seems to be a permissions error, can you try to run the command again with sudo?

@shreyamittal17

This comment has been minimized.

shreyamittal17 commented May 16, 2016

OSError: [Errno 13] Permission denied: '/usr/Python2.7/os.py'

Can anyone help with this ?

Thankyou in advance

@thiagopnts

This comment has been minimized.

Collaborator

thiagopnts commented May 19, 2016

@shreyamittal17 you get this error when you run pip install pync?

@dblack

This comment has been minimized.

dblack commented Jun 25, 2016

In case it might still help anyone (sorry if it's just noise), I was having these permission problems a-go-go, until I ran brew doctor and it told me to consider deleting ~/.pydistutils.cfg.

I considered.

I deleted.

All was well.

@pranaikumar

This comment has been minimized.

pranaikumar commented Jul 20, 2016

File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
requirement.install(install_options, global_options, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files
pycompile=self.pycompile,
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber
os.makedirs(destsubdir)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/geopy'

The above error was obtained when I tried an installation. Came here through google. Tried using this after reading the above comments

sudo chown -R $USER /usr/local/lib/python2.7/dist-packages/geopy

Which gave me an error of no such file or directory. Can anyone help me out! Thankyou in advance.

@thiagopnts

This comment has been minimized.

Collaborator

thiagopnts commented Jul 20, 2016

@pranaikumar have you tried to run your command with sudo?

@pranaikumar

This comment has been minimized.

pranaikumar commented Jul 20, 2016

@thiagopnts Yes I did use a sudo my exact command line was

sudo chown -R $USER /usr/local/lib/python2.7/dist-packages/geopy

@thiagopnts

This comment has been minimized.

Collaborator

thiagopnts commented Jul 20, 2016

@pranaikumar I mean for the installation, which command did you run? Try running it with sudo

@pranaikumar

This comment has been minimized.

pranaikumar commented Jul 20, 2016

@thiagopnts I just used sudo and this is what I got as an error

Downloading/unpacking geopy==1.11.0 (from -r requirements.txt (line 1))
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement geopy==1.11.0 (from -r requirements.txt (line 1))

Iam actually installing it from a file in my own computer that I downloaded through git and extracted. The exact command was
sudo pip install -r requirements.txt

@thiagopnts

This comment has been minimized.

Collaborator

thiagopnts commented Jul 20, 2016

Looks like you're trying to install something else, not pync(which this thread is about). Your error now says it can't find the lib listed in the requirements.txt file

@pranaikumar

This comment has been minimized.

pranaikumar commented Jul 20, 2016

@thiagopnts
Yes Iam installing something else and stumbled upon a similar issue mentioned here hence I popped up my issue. Btw it's solved the geopy version mentioned in requirements.txt was wrong! Thanks for helping though.

@Natglobe

This comment has been minimized.

Natglobe commented Aug 3, 2016

I get this error when I type in the command: "chown: sudo: illegal user name"

@ellieandallen

This comment has been minimized.

ellieandallen commented Oct 7, 2016

once i met the same problem,the code was pip install fuzzywuzzy,then i plus sudo in the front,it turns ok.

@dopexxx

This comment has been minimized.

dopexxx commented Oct 29, 2016

Dear all,

I tried the commands suggested above (sudo chown -R $USER /Library/Python/2.7 and the same with the site-package folder).
I still get this error:

Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip-8.1.2-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 293, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/easy_install.py'

Could please somebody help me!?
Cheers!

PS: I get the same error while trying to install libraries like tensorflow

@Newcool1230

This comment has been minimized.

Newcool1230 commented Nov 22, 2016

@thiagopnts
how to fix
Traceback (most recent call last):
File "./setoolkit", line 34, in
os.makedirs("/etc/setoolkit/")
File "/usr/lib/python2.7/os.py, line 157, in makedirs
mkdir(name,mode)

@thiagopnts

This comment has been minimized.

Collaborator

thiagopnts commented Nov 22, 2016

guys this is only for weechat-notification-center related issues, for python support/help try stackoverflow.com

Repository owner locked and limited conversation to collaborators Nov 22, 2016

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