I am getting this message when I try to install aws. Anyone have any ideas of what's going on?
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/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 725, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 756, 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 266, 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-TIuiKe-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
The command I'm using is pip install awscli
The problem is about permisson. The installer are trying to write in a folder that doesnt have permission.
try sudo pip install awscli
It looks like it is trying to uninstall six-1.4.1. I had the same issue. Telling pip to ignore installed package should work.
sudo pip install --ignore-installed awscli
sudo pip install --upgrade --user awscli
--upgrade : tells pip to upgrade any requirements that are already installed
Related
When i run command pip install django, on go daddy it gives me the following error:
I tried to copy django packages manually into the site-packages of go daddy. I copied it from my local machine. I removed all of them.(I don't know if there is something remaining or not. But i have checked it again) Can you please help with this?
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting django
Using cached Django-1.11.3-py2.py3-none-any.whl
Requirement already satisfied: pytz in /usr/lib/python2.6/site-packages (from django)
Installing collected packages: django
Exception:
Traceback (most recent call last):
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/home/lmtech123/.local/lib/python2.6/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib64/python2.6/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/usr/lib64/python2.6/site-packages/Django-1.11.3.dist-info'
The easy way is update to new version of Python3
sudo apt-get install python3
I am getting the below error while trying to install retrying module via pip.
The directory '/Users/ppious/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/ppious/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.
Collecting retrying
Downloading retrying-1.3.3.tar.gz
Collecting six>=1.7.0 (from retrying)
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, retrying
Found existing installation: six 1.4.1
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-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 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-ugYqQT-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I am using Mac OSX El Capitan. The error says OSError: [Errno 1] Operation not permitted. I tried running the same command with sudo and the error message is still there.
El Capitan comes with an older version of six installed which cannot be modified. Pip is trying to uninstall it as part of an upgrade and cannot do that. Try this:
pip install retrying --ignore-installed six
Ideally you would use a virtualenv which will allow you to install all the required versions.
When i execute ipython in terminal i see following error
aman#ebex-MacBookPro:~/ipython_work$ ipython
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3141, in <module>
#_call_aside
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3127, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3154, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 640, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 941, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 828, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pathlib2' distribution was not found and is required by ipython
Just before that i followed
$ git clone --recursive https://github.com/ipython/ipython.git
$ cd ipython
$ pip install -e ".[notebook]"
From the link [How to autosave ipython notebook]
http://stackoverflow.com/questions/21517296/how-to-autosave-ipython-notebook
I tried to uninstall and install using apt-get but its still not working and throwing missing distribution error.
I installed pathlib2 though
sudo pip install pathlib2
But again while accessing ipython
I see another error
pkg_resources.DistributionNotFound: The 'backports.shutil_get_terminal_size' distribution was not found and is required by ipython
You need install some packages manually as follows:
pip install pathlib2
pip install backports.shutil_get_terminal_size
pip install enum34
For me, I also had to pip install enum34 but otherwise int32bit's answer worked.
pip install pathlib2 backports.shutil_get_terminal_size enum34
I see the same error When i execute ipython interminal. The problem was solved by installing libraries about the exception.
I launched the Jupyter notebook from Anaconda "Environments" and the dos Windows open with all the launching packages in issues appearing.
Then I just had to install packages missing and mentioned in this window in your environment one by one. You can retry the same process as many times as needed.
I'm a newbie trying to set a server for my first phone-App on Amazon EC2 with nginx, django, uWSGI and mySQL.
I'm following those tutorials (actually the second is based on the first one):
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
http://www.oliverelliott.org/article/computing/tut_setup_nginx_django/
I'm using a MacbookPro and once in terminal I ssh into the Amazon Linux EC2 instance.
When it comes to install uwsgi..troubles arise.
I executed:
$ sudo yum install python-pip
$ sudo yum install python-devel
$ sudo pip install uwsgi
First two worked fine, last command thrown an exception:
Downloading/unpacking uwsgi
Running setup.py egg_info for package uwsgi
Installing collected packages: uwsgi
Running setup.py install for uwsgi
using profile: buildconf/default.ini
detected include path: ['/usr/include', '/usr/local/include']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-root/uwsgi/setup.py", line 109, in <module>
distclass=uWSGIDistribution,
File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/tmp/pip-build-root/uwsgi/setup.py", line 71, in run
conf = uc.uConf(get_profile())
File "uwsgiconfig.py", line 687, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
Complete output from command /usr/bin/python26 -c "import setuptools;__file__='/tmp/pip-build-root/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l8npX4-record/install-record.txt --single-version-externally-managed:
running install
using profile: buildconf/default.ini
detected include path: ['/usr/include', '/usr/local/include']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-root/uwsgi/setup.py", line 109, in <module>
distclass=uWSGIDistribution,
File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/tmp/pip-build-root/uwsgi/setup.py", line 71, in run
conf = uc.uConf(get_profile())
File "uwsgiconfig.py", line 687, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
----------------------------------------
Command /usr/bin/python26 -c "import setuptools;__file__='/tmp/pip-build-root/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-l8npX4-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/uwsgi
Storing complete log in /root/.pip/pip.log
I've tried two suggestions I read, but doesn't seem to work for me:
$ export CC=gcc && pip install -r requirements.txt
and
$ sudo CC=gcc pip install uwsgi
Any suggestions? Thanks a lot in advance!!
I was helped by this link: uWSGI: Installing from a distribution package
I did:
yum groupinstall "Development Tools"
yum install python-devel
and then:
pip install uwsgi
and after that it works.
This installation helped me:
sudo yum groupinstall "Development Tools"
sudo yum install python3-devel
Running yolk -U recently I noticed that pip needed upgrading from 1.2.1 to 1.4.1 and dutifully attempted to upgrade it with
pip install --upgrade pip
Though running yolk -U again appeared to confirm a successful upgrade (pip is no longer listed as being out of date), this generated an error message
Downloading/unpacking pip from https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#md5=6afbb46aeb48abac658d4df742bff714
Downloading pip-1.4.1.tar.gz (445kB): 445kB downloaded
Running setup.py egg_info for package pip
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Installing collected packages: pip
Found existing installation: pip 1.2.1
Uninstalling pip:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 261, in run
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1162, in install
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 495, in uninstall
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1492, in remove
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/util.py", line 273, in renames
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/bin/pip'
And on all my subsequent attempts to use pip do as well:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
continue # try the next older version of project
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: pip==1.2.1
I see that similar problems have been reported before, but none of the suggestions I see help resolve this.
I'm stuck, and can't maintain my Python installation.
I'm using OS 10.8.4, Python 2.7.2 in /usr/bin/python.
According to this line:
OSError: [Errno 13] Permission denied: '/usr/local/bin/pip'
It seems like a *nix permission issue, try to launch the upgrade using sudo:
sudo pip install --upgrade pip
On a side note, I'd recommend using this upgrade method: http://www.pip-installer.org/en/latest/installing.html#install-or-upgrade-pip
tl;dr version (thanks to the information given by OP ;)):
1.Download and laucnh get-pip.py from http://www.pip-installer.org/en/latest/installing.html#install-or-upgrade-pip
2.If you get an error about "invalid command 'egg_info'", you'll need to upgrade setup tools using pip install --upgrade setuptools or easy_install -U