how do i control to which python to install a package - python

i'm on win7/64, and have some pythons already, but want to be installing mosek to a new WinPython
>where python
C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.exe
C:\Python27\python.exe
C:\Program Files (x86)\LilyPond\usr\bin\python.exe
i'm following these instructions
>cd C:\Program Files\Mosek\7\tools\platform\win64x86\python\2
>python setup.py build --build-base c:\Users\nlab install --user
running build
running build_py
creating c:\Users\nlab\lib
creating c:\Users\nlab\lib\mosek
copying mosek\array.py -> c:\Users\nlab\lib\mosek
copying mosek\__init__.py -> c:\Users\nlab\lib\mosek
creating c:\Users\nlab\lib\mosek\fusion
copying mosek\fusion\SolverInfo.py -> c:\Users\nlab\lib\mosek\fusion
copying mosek\fusion\Utils.py -> c:\Users\nlab\lib\mosek\fusion
copying mosek\fusion\__init__.py -> c:\Users\nlab\lib\mosek\fusion
running install
running install_lib
creating C:\Users\nlab\AppData\Roaming\Python
creating C:\Users\nlab\AppData\Roaming\Python\Python27
creating C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages
creating C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying c:\Users\nlab\lib\mosek\array.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
creating C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\fusion\SolverInfo.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\fusion\Utils.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\fusion\__init__.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion
copying c:\Users\nlab\lib\mosek\__init__.py -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\array.py to array.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion\SolverInfo.py to SolverInfo.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion\Utils.py to Utils.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\fusion\__init__.py to __init__.pyc
byte-compiling C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek\__init__.py to __init__.pyc
running install_data
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\mosek64_7_1.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\mosekglb64_7_1.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\mosekxx7_1.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\bin\libiomp5md.dll -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
copying C:\Program Files\Mosek\7\tools\platform\win64x86\python\2\..\..\..\..\..\license.pdf -> C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\mosek
running install_egg_info
Writing C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\Mosek-7.1.31-py2.7.egg-info
Please review the MOSEK license conditions in license.pdf
that created and used
C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\
but i want
C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\Lib\site-packages\
i tried using WinPython's exe explicitly:
>C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.exe setup.py build --build-base c:\Users\nlab install --user
running build
running build_py
running install
running install_lib
running install_data
running install_egg_info
Removing C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\Mosek-7.1.31-py2.7.egg-info
Writing C:\Users\nlab\AppData\Roaming\Python\Python27\site-packages\Mosek-7.1.31-py2.7.egg-info
Please review the MOSEK license conditions in license.pdf
but that doesn't seem to help

I believe it is your setup.py options which are causing the error. Specifically the user option will install into a specific directory linked to your user profile
https://docs.python.org/2/install/#alternate-installation-the-user-scheme
, regardless of what's linked to the WinPython. This is for users who do not have write privileges in system directories. If you want to link the install to your WinPython, then run
C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\python.exe setup.py install
And if you want to be sure it installs in the correct location, use the --prefix option
https://docs.python.org/2/install/#alternate-installation-windows-the-prefix-scheme
e.g.
python.exe setup.py install --prefix="C:\Users\nlab\Downloads\WinPython-64bit-2.7.9.5\python-2.7.9.amd64\"
... but this shouldn't be necessary as that is just the default prefix associated with this particular WinPython.

Related

Can't install the package scikit-learn-extra

I received a python file from a contributor who makes use of the scikit-learn-extra library. When I try to install it I get the following error:
error: subprocess-exited-with-error
× Building wheel for scikit-learn-extra (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [49 lines of output]
C:\Users\bogda\AppData\Local\Temp\pip-build-env-0mronz9o\overlay\Lib\site-packages\setuptools\dist.py:775: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\benchmarks
copying benchmarks\bench_rbfsampler_fastfood.py -> build\lib.win-amd64-cpython-310\benchmarks
copying benchmarks\__init__.py -> build\lib.win-amd64-cpython-310\benchmarks
creating build\lib.win-amd64-cpython-310\sklearn_extra
copying sklearn_extra\_version.py -> build\lib.win-amd64-cpython-310\sklearn_extra
copying sklearn_extra\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra
creating build\lib.win-amd64-cpython-310\benchmarks\_bench
copying benchmarks\_bench\eigenpro_plot_mnist.py -> build\lib.win-amd64-cpython-310\benchmarks\_bench
copying benchmarks\_bench\eigenpro_plot_noisy_mnist.py -> build\lib.win-amd64-cpython-310\benchmarks\_bench
copying benchmarks\_bench\eigenpro_plot_synthetic.py -> build\lib.win-amd64-cpython-310\benchmarks\_bench
copying benchmarks\_bench\robust_plot_synthetic.py -> build\lib.win-amd64-cpython-310\benchmarks\_bench
copying benchmarks\_bench\__init__.py -> build\lib.win-amd64-cpython-310\benchmarks\_bench
creating build\lib.win-amd64-cpython-310\sklearn_extra\cluster
copying sklearn_extra\cluster\_commonnn.py -> build\lib.win-amd64-cpython-310\sklearn_extra\cluster
copying sklearn_extra\cluster\_k_medoids.py -> build\lib.win-amd64-cpython-310\sklearn_extra\cluster
copying sklearn_extra\cluster\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\cluster
creating build\lib.win-amd64-cpython-310\sklearn_extra\kernel_approximation
copying sklearn_extra\kernel_approximation\test_fastfood.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_approximation
copying sklearn_extra\kernel_approximation\_fastfood.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_approximation
copying sklearn_extra\kernel_approximation\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_approximation
creating build\lib.win-amd64-cpython-310\sklearn_extra\kernel_methods
copying sklearn_extra\kernel_methods\_eigenpro.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_methods
copying sklearn_extra\kernel_methods\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_methods
creating build\lib.win-amd64-cpython-310\sklearn_extra\robust
copying sklearn_extra\robust\mean_estimators.py -> build\lib.win-amd64-cpython-310\sklearn_extra\robust
copying sklearn_extra\robust\robust_weighted_estimator.py -> build\lib.win-amd64-cpython-310\sklearn_extra\robust
copying sklearn_extra\robust\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\robust
creating build\lib.win-amd64-cpython-310\sklearn_extra\tests
copying sklearn_extra\tests\test_common.py -> build\lib.win-amd64-cpython-310\sklearn_extra\tests
copying sklearn_extra\tests\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\tests
creating build\lib.win-amd64-cpython-310\sklearn_extra\cluster\tests
copying sklearn_extra\cluster\tests\test_commonnn.py -> build\lib.win-amd64-cpython-310\sklearn_extra\cluster\tests
copying sklearn_extra\cluster\tests\test_k_medoids.py -> build\lib.win-amd64-cpython-310\sklearn_extra\cluster\tests
copying sklearn_extra\cluster\tests\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\cluster\tests
creating build\lib.win-amd64-cpython-310\sklearn_extra\kernel_approximation\tests
copying sklearn_extra\kernel_approximation\tests\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_approximation\tests
creating build\lib.win-amd64-cpython-310\sklearn_extra\kernel_methods\tests
copying sklearn_extra\kernel_methods\tests\test_eigenpro.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_methods\tests
copying sklearn_extra\kernel_methods\tests\__init__.py -> build\lib.win-amd64-cpython-310\sklearn_extra\kernel_methods\tests
running build_ext
building 'sklearn_extra.utils._cyfht' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scikit-learn-extra
Failed to build scikit-learn-extra
ERROR: Could not build wheels for scikit-learn-extra, which is required to install pyproject.toml-based projects
I've tried to Install a greater Version of Microsoft Visual C++ but it dosen't work. On the machine of my collaborator it works. He has a linux OS.
I've also tried to install by downloading the repository and running python setup.py install but I got this error:
Traceback (most recent call last):
File "C:\Users\bogda\Desktop\scikit-learn-extra-main\setup.py", line 8, in <module>
from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'

error: file 'C:\Python27\Tools\Scripts\ftpmirror.py' does not exist

When I execute python setup.py install in Windows 10, I see this output:
C:\Python27\Tools\Scripts>python setup.py install
running install
running build
running build_scripts
creating build
creating build\scripts-2.7
copying and adjusting byteyears.py -> build\scripts-2.7
copying and adjusting checkpyc.py -> build\scripts-2.7
copying and adjusting copytime.py -> build\scripts-2.7
copying and adjusting crlf.py -> build\scripts-2.7
copying and adjusting dutree.py -> build\scripts-2.7
error: file 'C:\Python27\Tools\Scripts\ftpmirror.py' does not exist
I solve this problem very easy. Just add/copy missing file from https://svn.python.org/projects/python/trunk/Tools/scripts/ftpmirror.py to the path C:\Python27\Tools\Scripts and execute
python setup.py install
again.

How to install sudokumaker from pypi?

I want to utilize sudokumaker 0.2 in my Django app. But I cannot install this package. How can I install it?
I tried the following:
virtualenv '/path_to/project' -p /usr/bin/python2.7
sudo pip install sudokumaker
and
sudo pip install sudokumaker-0.2
Normally, you don't use sudo, once you have a virtual environment setup:
virtualenv /path/to/virtualenv -p /usr/bin/python2.7
source /path/to/virtualenv/bin/activate
(virtualenv) $ pip install sudokumaker
However this package has not published any releases; until the author does so pip won't be able to install anything.
To install it, you'll have to download the source from sourceforge; expand the archive and then manually install it:
$ virtualenv sudoku
New python executable in sudoku/bin/python
Installing setuptools, pip...done.
$ source sudoku/bin/activate
(sudoku)$ tar xvzf ~/Downloads/sudokumaker-0.4.tar.gz
sudokumaker-0.4/
sudokumaker-0.4/PKG-INFO
sudokumaker-0.4/setup.py
sudokumaker-0.4/maker.py
sudokumaker-0.4/README.html
sudokumaker-0.4/sudoku_as_tex
sudokumaker-0.4/sudoku.py
sudokumaker-0.4/Version.py
sudokumaker-0.4/README.rst
sudokumaker-0.4/sudokumaker
sudokumaker-0.4/__init__.py
(sudoku)burhan#T530 ~ $ cd sudokumaker-0.4/
(sudoku)burhan#T530 ~/sudokumaker-0.4 $ python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/sudokumaker
copying Version.py -> build/lib.linux-x86_64-2.7/sudokumaker
copying maker.py -> build/lib.linux-x86_64-2.7/sudokumaker
copying sudoku.py -> build/lib.linux-x86_64-2.7/sudokumaker
copying __init__.py -> build/lib.linux-x86_64-2.7/sudokumaker
running build_scripts
creating build/scripts-2.7
copying and adjusting sudoku_as_tex -> build/scripts-2.7
copying and adjusting sudokumaker -> build/scripts-2.7
changing mode of build/scripts-2.7/sudoku_as_tex from 644 to 755
changing mode of build/scripts-2.7/sudokumaker from 644 to 755
running install_lib
creating /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker
copying build/lib.linux-x86_64-2.7/sudokumaker/Version.py -> /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker
copying build/lib.linux-x86_64-2.7/sudokumaker/maker.py -> /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker
copying build/lib.linux-x86_64-2.7/sudokumaker/sudoku.py -> /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker
copying build/lib.linux-x86_64-2.7/sudokumaker/__init__.py -> /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker
byte-compiling /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker/Version.py to Version.pyc
byte-compiling /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker/maker.py to maker.pyc
byte-compiling /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker/sudoku.py to sudoku.pyc
byte-compiling /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker/__init__.py to __init__.pyc
running install_scripts
copying build/scripts-2.7/sudoku_as_tex -> /home/burhan/sudoku/bin
copying build/scripts-2.7/sudokumaker -> /home/burhan/sudoku/bin
changing mode of /home/burhan/sudoku/bin/sudoku_as_tex to 755
changing mode of /home/burhan/sudoku/bin/sudokumaker to 755
running install_egg_info
Writing /home/burhan/sudoku/lib/python2.7/site-packages/sudokumaker-0.4-py2.7.egg-info
You will also need to download and rsclib - again, manually.
python -m pip install sudokumaker
or
python2 -m pip install sudokumaker
To install the python package. The package definitly exists: https://pypi.python.org/pypi/sudokumaker

Python setuptools install_requires error

I'm using setuptools to create a quick setup.py script to install dependencies for the user. The package only requires numpy and matlibplot. So the code looks something like this:
from setuptools import setup
setup(
name = "somePackageName",
version = "1.0",
packages = ['doc', 'inputs', 'inputs', 'src'],
install_requires = ['distribute == 0.7.3', 'numpy', 'matplotlib']
)
running sudo python setup.py install gives me the following:
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating fabSim.egg-info
writing requirements to fabSim.egg-info/requires.txt
writing fabSim.egg-info/PKG-INFO
writing top-level names to fabSim.egg-info/top_level.txt
writing dependency_links to fabSim.egg-info/dependency_links.txt
writing manifest file 'fabSim.egg-info/SOURCES.txt'
reading manifest file 'fabSim.egg-info/SOURCES.txt'
writing manifest file 'fabSim.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/doc
copying doc/__init__.py -> build/lib.linux-x86_64-2.7/doc
creating build/lib.linux-x86_64-2.7/inputs
copying inputs/__init__.py -> build/lib.linux-x86_64-2.7/inputs
creating build/lib.linux-x86_64-2.7/src
copying src/simulation.py -> build/lib.linux-x86_64-2.7/src
copying src/good.py -> build/lib.linux-x86_64-2.7/src
copying src/producer.py -> build/lib.linux-x86_64-2.7/src
copying src/__init__.py -> build/lib.linux-x86_64-2.7/src
copying src/validate.py -> build/lib.linux-x86_64-2.7/src
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/doc
copying build/lib.linux-x86_64-2.7/doc/__init__.py -> build/bdist.linux-x86_64/egg/doc
creating build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/simulation.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/good.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/producer.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/__init__.py -> build/bdist.linux-x86_64/egg/src
copying build/lib.linux-x86_64-2.7/src/validate.py -> build/bdist.linux-x86_64/egg/src
creating build/bdist.linux-x86_64/egg/inputs
copying build/lib.linux-x86_64-2.7/inputs/__init__.py -> build/bdist.linux-x86_64/egg/inputs
byte-compiling build/bdist.linux-x86_64/egg/doc/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/simulation.py to simulation.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/good.py to good.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/producer.py to producer.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/src/validate.py to validate.pyc
byte-compiling build/bdist.linux-x86_64/egg/inputs/__init__.py to __init__.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying fabSim.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/fabSim-1.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing fabSim-1.0-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg
Extracting fabSim-1.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
fabSim 1.0 is already the active version in easy-install.pth
Installed /usr/local/lib/python2.7/dist-packages/fabSim-1.0-py2.7.egg
Processing dependencies for fabSim==1.0
Searching for matplotlib
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
Reading http://matplotlib.org
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/
Best match: matplotlib 1.3.0
Downloading https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.0/matplotlib-1.3.0.tar.gz
Processing matplotlib-1.3.0.tar.gz
Writing /tmp/easy_install-xOXtid/matplotlib-1.3.0/setup.cfg
Running matplotlib-1.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xOXtid/matplotlib-1.3.0/egg-dist-tmp-JFeCc4
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.28dev-r0 (/usr/lib/python2.7/dist-packages))
error: Setup script exited with 2
My understanding of setuptools is probably off as I expect it to update/install available dependencies from PyPI. Could someone provide additional insight on this?
pip install -U distribute
or
easy_install -U distribute

error: could not create '/Library/Python/2.7/site-packages/xlrd': Permission denied

I'm trying to install xlrd on mac 10.8.4 to be able to read excel files through python.
I have followed the instructions on http://www.simplistix.co.uk/presentations/python-excel.pdf
I did this:
unzipped the folder to desktop
in terminal, cd to the unzipped folder
$ python setup.py install
This is what I get:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/xlrd
copying xlrd/__init__.py -> build/lib/xlrd
copying xlrd/biffh.py -> build/lib/xlrd
copying xlrd/book.py -> build/lib/xlrd
copying xlrd/compdoc.py -> build/lib/xlrd
copying xlrd/formatting.py -> build/lib/xlrd
copying xlrd/formula.py -> build/lib/xlrd
copying xlrd/info.py -> build/lib/xlrd
copying xlrd/licences.py -> build/lib/xlrd
copying xlrd/sheet.py -> build/lib/xlrd
copying xlrd/timemachine.py -> build/lib/xlrd
copying xlrd/xldate.py -> build/lib/xlrd
copying xlrd/xlsx.py -> build/lib/xlrd
creating build/lib/xlrd/doc
copying xlrd/doc/compdoc.html -> build/lib/xlrd/doc
copying xlrd/doc/xlrd.html -> build/lib/xlrd/doc
creating build/lib/xlrd/examples
copying xlrd/examples/namesdemo.xls -> build/lib/xlrd/examples
copying xlrd/examples/xlrdnameAPIdemo.py -> build/lib/xlrd/examples
running build_scripts
creating build/scripts-2.7
copying and adjusting scripts/runxlrd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/runxlrd.py from 644 to 755
running install_lib
creating /Library/Python/2.7/site-packages/xlrd
error: could not create '/Library/Python/2.7/site-packages/xlrd': Permission denied
Why is permission denied? Thanks
Try python setup.py install --user
You shouldn't use sudo as suggested above for two reasons:
You're allowing arbitrary untrusted code off the internet to be run as root
Passing the --user flag to python setup.py install will install the package to a user-owned directory. Your normal non-root user won't be able to access the files installed by sudo pip or sudo python setup.py
try sudo python setup.py install
the /Library folder needs root permission to be accessed.
Try in a virtualenv:
sudo pip install virtualenvwrapper
mkvirtualenv
workon
python setup.py install

Categories

Resources