I have been having a really hard time getting nose to installed properly on my mac. Many people on the site have had this problem in the past and I was following the instructions of past posts. In the terminal is shows that nose is installed and upgraded.
pip install nose
When I tried to uninstall nose I got this back:
Exception:
Traceback (most recent call last): File
"/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, 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 336, in
uninstall
req.uninstall(auto_confirm=auto_confirm) File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 742,
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/nose-1.3.7.dist-info/DESCRIPTION.rst'
What can I do to get nose installed properly. Thank you!
If permission is denied, then you should try uninstalling it with super-user privileges. That is, run sudo pip uninstall nose.
Related
I tried installing Pandas on macOS.
It first tries to install Numpy, says
Found existing installation: numpy 1.8.0rc1
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling numpy-1.8.0rc1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, 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 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/8y/lq4gsyx97_q171qrh2q18z0h0000gn/T/pip-9NwJUf-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'
Then fails to install Pandas. "pip list" shows numpy (1.8.0rc1) has been installed.
Thanks for the help.
When I use sudo, this happens.
I guess you need to run pip as super user or a system user that has the permission to write to Python package site directory;
I don't own a mac but I think the general course of action for you will be to try to install pandas as root like this:
sudo pip install -U pandas
For a sentdex tutorial I had to install quandl, but whenever I try to install this python module in python2.7 I get a error:
Found existing installation: numpy 1.8.0rc1
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling numpy-1.8.0rc1:
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 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/26/51wbl41d7hg6gh4vs7zlwchh0000gp/T/pip-HFl5IT-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'
Ive seen this error whenever a installing module needed numpy but already found it so it tried to uninstall it thus resulting in a crash. I have tried "sudo pip install quandl", "pip install quandl", and some more.
Please Help, Thanks!
SOLVED!!!
I tried easy_install and it worked, can't believe that I couldn't find the answer on the internet!!!
I did : "sudo easy_install quandl" And it worked!!!
When I started learning Python I didn't know about virtualenv and so installed all my stuff at system level.
I wanted to do a full clean out to prevent issues. However, creating the requirements.txt and then trying to run uninstall on it throws the following error and doesn't complete any uninstalling. Any ideas what might be wrong?
> Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/uninstall.py", line 76, in run
requirement_set.uninstall(auto_confirm=options.yes)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 346, in uninstall
req.uninstall(auto_confirm=auto_confirm)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/awscli-1.11.83.dist-info/DESCRIPTION.rst'
Not an amazing solution but i rebooted terminal and tried sudo again and it cooperated this time... i cant offer more than that im afrad
i have been trying to install tweepy on MAC OSX using pip from terminal. Command I use is
sudo pip install tweepy
While this command is executing an error occurs. Please tell me how I can bypass this to install tweepy.
Error:
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, 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 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-pId7ub-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
As another user suggested in comments, problem is linked to six package.
Try to install tweepy running this command:
sudo pip install tweepy --ignore-installed six
or
pip install --ignore-installed six
There is an issue with six on MAC OSX. (link here)
when i run >pip install pokitdok
I got below error
to run >pip install pokitdok what changes i have to do
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/commands/install.py", line 347, in run
root=options.root_path,
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/req/req_set.py", line 543, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/req/req_install.py", line 667, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/req/req_uninstall.py", line 126, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/utils/__init__.py", line 316, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 300, in move
rmtree(src)
File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/oauthlib/__init__.py'
As a general rule, you only want to elevate privileges(sudo) if you absolutely have to. One good alternative is to use a Python virtualenv, as described in this this question.
Of course, if you're just tinkering, it's probably not a big deal.
You need to install it as root user, so use sudo:
sudo pip install pokitdok