How to install sudokumaker from pypi? - python

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

Related

Cannot install psycopg2 Ubuntu

Trying to get a server ready for a django project and I'm running into some issues with setup for postgres.
I'm following this guide:
https://jee-appy.blogspot.com/2017/01/deply-django-with-nginx.html
And I'm at step 5:
Now, we need to configure postgreSQL so that it can communicate with our Django application. For this, install psycopg2 database
adapter. But this adapter have some package dependencies, so first
install them.
run:
(django_env) $ sudo apt-get install libpq-dev python3-dev
then...
(django_env) $ pip install psycopg2
I do that, and this point in the instructions, I get a "compilation failed" error.
I tried the solutions suggested in this stack exchange question:
Trouble with psycopg2 in virtualenv python3 for use with Django
and this one:
Cannot install psycopg2 on virtualenv
I am very much a linux and django noob, so if this is a duplicate issue, please have mercy on me and leave a comment explaining why you are marking it as a duplicate as you do so.
Thanks for your time!
Here's the output and install command that caused it:
(django_env1) user:/home/projects/sample_project$ sudo pip install psycopg2
Downloading/unpacking psycopg2
Downloading psycopg2-2.7.3.2.tar.gz (425kB): 425kB downloaded
Running setup.py (path:/tmp/pip_build_root/psycopg2/setup.py) egg_info for package psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.7.3.2 (dt dec pq3 ext lo64)" -DPG_VERSION_NUM=90320 -DHAVE_LO64=1 -I/usr/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:27:0:
./psycopg/psycopg.h:34:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_0zc1L-record/install-record.txt --single-version-externally-managed --compile:
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/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-2.7/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-2.7/psycopg2
creating build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_async_keyword.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_sql.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_ipaddress.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_replication.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-2.7/psycopg2/tests
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/psycopg
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.7.3.2 (dt dec pq3 ext lo64)" -DPG_VERSION_NUM=90320 -DHAVE_LO64=1 -I/usr/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/9.3/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement
In file included from psycopg/psycopgmodule.c:27:0:
./psycopg/psycopg.h:34:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_0zc1L-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/psycopg2
You've installed the python-dev libraries for Python 3. Your psycopg2 install is using python 2.7
If you want to use Python 3:
Make sure you've installed python3-pip
sudo apt-get install python3-pip
Then:
pip3 install psycopg2
If that still fails, try installing the development headers for postgresql:
sudo apt install python3-dev libpq-dev
pip3 install psycopg2
If on Python 2
sudo apt update
sudo apt-get install postgresql postgresql-contrib
sudo apt-get install libpq-dev
sudo apt-get install python-dev
sudo apt-get install python-pip
pip2 install psycopg2-binary
If on Ubuntu 20.04 or above
sudo apt-get install build-essential
Then run the other steps for either Python 2 or 3.
Note that on many distros, the development headers needed for compiling against libraries are not installed by default. For psycopg2 on Ubuntu you'll need the python3 and postgresql headers:
sudo apt install python3-dev libpq-dev
pip3 install psycopg2
These can be installed in your activated virtual environment.
I was testing my application on a ubuntu docker image that only has python2.7.6 installed (as happens in most big orgs)
If you are using python2.x (though you should plan to move to 3.x asap), check the below dependencies:
sudo apt update
sudo apt-get install postgresql postgresql-contrib
sudo apt-get install libpq-dev # this is required as psycopg2 uses pg_config
sudo apt-get install python-dev
sudo apt-get install python-pip
Now install psycopg2 using:
pip2 install psycopg2-binary
I had the same error trying to install it in a virtualenv (with python3)
I solved it by installing a previous version of psycopg2.
pip install psycopg2==2.7.5
This solved mine. I am using Python 3.8.2, Ubuntu 20.04 LTS:
sudo apt-get install python3-dev
sudo apt-get install python3-pip
pip install psycopg2
To install psycopg2 in ubuntu or mate 20 you need first to install:
sudo apt install libpq-dev
and then:
pip3 install psycopg2
In my case, I was facing this problem when I ran pip install -r requirements.txt to install all packages for a Django project on an Ubuntu machine, I ran into this error and many other installation errors.
To solve this one, I ran the following commands:
sudo apt install postgresql postgresql-contrib
sudo apt install libpq-dev
sudo apt install python3-dev
sudo apt install python3-pip
sudo apt install python3-psycopg2
pip3 install psycopg2
pip3 install psycopg2-binary
Plus, also check if the Ubuntu and Python and Psycopg versions are compatible together.
Also, #Arghya Bhattacharya answers pip install aiopg, solve the issue when i ran into it the second time.
I had to install this one as well on my Ubuntu 20.04 LTS:
sudo apt-get install build-essential
I faced same issue on my ubuntu 18.04 LTS OS.
Also, face some issues in Pillow. In both cases (psycopg2 and Pillow) these command solved my issue.
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev libjpeg-dev libjpeg8-dev
sudo apt install libpq-dev
sudo apt-get install python3-pip
Note: I have installed psycopg2 in python=3.8.5 environment.
make sure you are using the correct psycopg version for the python version.
Example for python 3.8.
python 3.8, the supported version is psycopg 2.8.4.
Reference ubuntu 20.04 + python 3.8 , pip install psycopg2==2.7.3.2 error #1106
I solved this issue using another package which itself internally installs psycopg2.
pip install aiopg

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 do i control to which python to install a package

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.

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