Cannot install cvxopt on OSX 10.10.5 - python

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

Related

Errno 13 Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'

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

Problems installing django

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.

Received an error message when installing Beautiful Soup4 on Mac

I am using a Mac and I get an error message on my terminal when I try to install Beautiful Soup. I have Python 3 installed already.
This is what I did after unpacking the Beautiful Soup zip file
$ cd Users/thepredestrian/Desktop/beautifulsoup4-4.4.1
$ python setup.py install
This is the error message that appears:
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-966.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
Any advice appreciated!
Try installing with sudo.
sudo python setup.py install
An alternate way is to use virtual environment. Inside a virtual environment, you can install dependencies locally rather than system wide, so you won't need access to a root account.
pip install virtualenv
virtualenv test
cd test
source bin/activate
The first line installs virtualenv. The second line creates a virtual environment. The third and fourth line activates (starts) the virtualenv. You will notice the change in prompt. Inside virtualenv, you can install dependencies (e.g BeautifulSoup), run python scripts and so on. Once you're done, you can deactivate the environment by simply typing deactivate in the shell.

Error while installing beautfulsoup on my mac os

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).

Installing SUDS in python 2.6.4

I am having real trouble installing SUDS in python 2.6.4. I have tried to install the setup file but it says the location of python cannot be found. This is because I have changed the location of python. I have tried to use easy_install but am having no luck. Does anyone know a simple way to do this or have a link to clear installation instructions.
Command that I entered was:
python setup.py install
The result I recieved was:
running install
error: cannot 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/site-packages/test-easy-install-9203.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python2.6/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
And if I have to change the python path how exactly do you do this.
I have tried what one site said to do and it was to first, create an altinstall.pth file in Python's site-packages directory, containing the following line:
import os, site; site.addsitedir(os.path.expanduser('~/lib/python2.3'))
Then it says modify distutils.cfg in the distutils directory with:
[install]
install_lib = ~/lib/python2.3
# This next line is optional but often quite useful; it directs EasyInstall
# and the distutils to install scripts in the user's "bin" directory. For
# Mac OS X framework Python builds, you should use /usr/local/bin instead,
# because neither ~/bin nor the default script installation location are on
# the system PATH.
#
install_scripts = ~/bin
Have you tried setting PYTHONPATH to the location of python? Maybe this way it will know, where to install it.
You are calling it with python setup.py install. Try sudo python setup.py install, if you are using some linux and you are sudoer.
I got messages like this too when I installed suds and python-ntlm. Our site has a separate areafor installations so that we can maintain multiple versions, so my first installation step was
python setup.py install --prefix=/install/suds/suds-0.4
and I got the same messages about installplace. To fix:
Make sure the directories are there with
mkdir -p /install/suds/suds-0.4/lib/python2.6/site-packages/
(This surprised me a little, I thought setup would build the directories.)
Make sure you have write permission down the tree with
chmod -R 775 /install/suds/suds-0.4/lib/python2.6/site-packages/
Neither of which got rid of the message!
The last step was to put the install area into PYTHONPATH, and then do the setup.py
export PYTHONPATH=/install/suds/suds-0.4/lib/python2.6/site-packages:$PYTHONPATH
python setup.py install --prefix=/opt/sw/fw/qce/suds/suds-0.4
with a final chmod to make the newly installed files readable in case umask is set to something restrictive:
chmod 755 /install/suds/suds-0.4/lib/python2.6/site-packages/*
After this I could start python and import suds. The key step was the putting the suds site-packages directory into PYTHONPATH.
I expect this help comes too late to help the original poster, but I hope it helps someone else who come to SO with this question. As I did.
I would need more details of your OS to give a fully accurate response. From the sounds of your question, you changed your path of python. Normally you'll have a preinstalled version of python that is compatible with your OS. For example, CentOS 5.x comes with python 2.4, however you can do a yum install of python 2.6. Once installed, you can run python 2.6 by the python26 command.
When doing installs and packages, I would recommend that you try to use package managers as much as possible, as they help take care of your dependencies, such as yum. Yum also helps control updating packages instead of having to do updates manually. The next best thing is to do installs via pip or easy install, in the case of this question, you can try easy_install https://fedorahosted.org/releases/s/u/suds/python-suds-0.4.tar.gz (requires setuptools), and as a last resort, you can try to do the manual install. I if I get the point that I'm doing a manual install, I feel I failed somewhere :)
Others have given good detail on on how to do the install manually.
Good luck.

Categories

Resources