I want to install NLTK(natural language toolkit) on my mac, but when I used
sudo curl https://bootstrap.pypa.io/ez_setup.py -o - | python
on my terminal, after I enter the password; the terminal says
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-2365.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
Something went wrong during the installation.
See the error message above.
Could anyone please tell me how to fix it, I really need this toolkit to finish my work.
Thanks
You need a second sudo, you need to also run python with sudo python
sudo curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python
Related
I've downloaded python 3.6.1 and I'm trying to use terminal to setup beautifulsoup4 but it keeps trying to install on python 2.7. Any help?
Jakes-iMac:beautifulsoup4-4.5.3 Jake$ cd /Users/Jake/Downloads/beautifulsoup4-4.5.3
Jakes-iMac:beautifulsoup4-4.5.3 Jake$ python setup.py install
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again
Running the "python" command in your terminal will by default run Python 2 on many systems, even after you have installed Python 3. Try using the "python3" command instead.
try this:
sudo python setup.py install
I'm trying to install django by acessing the directory that contains setup.py using
cd [Path to Django] and then python setup.py install. But the following is shown on terminal:
running install
Checking .pth file support in /usr/local/lib/python3.4/dist-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python3.4/dist-packages>/test-easy-install-5264.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.4/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
I am new to using Ubuntu and Python, so i am a little lost. Can someone help?
I am using Ubuntu 14.04.
I am trying to install BeautifulSoup on my macOS. While installing i m getting below.
And also I tried with python setup.py install, but getting same error
Please help me to resolve this
bash-3.2$ easy_install /Users/SJV/Downloads/beautifulsoup4-4.4.1/beautifulsoup4.egg-info
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-620.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
Are you using root? Try:
sudo pip install beautifulsoup4 # will ask your sudo password
Or login as root before run pip install beautifulsoup4.
Also, install it in virtualenv or this way can without root permission(if you don't have root permission).
I was trying to install cvxopt to my OSX system. But It didn't work.
I just followed the instruction of the standard installation on: http://cvxopt.org/install/#standard-installation.
The response from the terminal is as follows:
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-527.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again.
Anyone could help me?
Thank you very much~
You are trying to install the package to a system owned folder location. You can overcome this by running sudo python setup.py installm but you will end up with a mess of installed libraries. Rather create a virtual environment in a location that your user owns. This way you keep your main python install clean and can chop and change versions as you need.
For more information see
I am trying to use easy_install to install a module called requests by doing
easy_install requests
This worked fine a week ago when I was using Python 2.6.5 but today I installed Python 2.7.2 and then tried to import requests in one of my scripts but it failed. I then tried reinstalling requests with easy_install requests but got this error
install_dir /usr/local/lib/python2.6/dist-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-15207.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python2.6/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://packages.python.org/distribute/easy_install.html
Please make the appropriate changes for your system and try again.
So I was told to go reinstall easy_install and I went to http://pypi.python.org/pypi/setuptools and learned I had to
delete all setuptools*.egg and setuptools.pth files from your
system's site-packages directory (and any other sys.path directories)
FIRST.
So I did this. I then reinstalled setuptools from the setuptools-0.6c11-py2.7.egg. It seemed successful but when I ran easy_install requests I got basically the same error except the directory python2.6/dist-packages is now python2.7/site-packages
siddhion#siddhion-laptop:~$ easy_install requests
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/test-easy-install-16253.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://peak.telecommunity.com/EasyInstall.html
Please make the appropriate changes for your system and try again.
Also, when I do easy_install and press tab I get these options
easy_install easy_install-2.6 easy_install-2.7
How come easy_install-2.6 is there?
and
How do I get easy-install working again?
Did you try using sudo like this?
sudo easy_install requests
Or specify the install directory to a directory that you have write privileges.
easy_install --install-dir=/home/foo/bar
But you should really use PIP instead of easy_install. It is much better and has a lot more features.
You should use virtualenv on package-based Linux distributions so Python scripts don't interfere with other packages or conflict with the OS's package-manager.
http://workaround.org/easy-install-debian
The following worked for me with Ubuntu 12.10 installing easy_install then pip:
sudo apt-get install python-virtualenv
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python get-pip.py
Have you tried adding your new python.framework to path?
On mountain lion I added
/Library/Frameworks/Python.framework/Versions/3.3/bin/
to
/etc/paths
and then I was able to use easy_install-3.3 and pip-3.3
Using Sudo before easy_install may solve your problem
Sudo easy_install requests
thanks
It might be a simple case of you missing "sudo" in the front. Can you try it with sudo easy-install requests
putting the "sudo" will add the required permissions.