Installing django on red hat linux box

95 views
Skip to first unread message

robert brook

unread,
Oct 22, 2014, 12:12:10 PM10/22/14
to django...@googlegroups.com

I have alot of experience installing packages on windows and mac and it goes very smoothly.
I do not have alot of experience doing the installs on a Linux box.

I am running into problems installing 4 packages.

The Lan team tried yum, but the basic django packages were not available.

Then I tried installing pip and I got proxy errors using the get-pip.py script

So I fell back to installing the dowloaded packages with the old standy  setup.py install which fails.

I am attaching the top of the log

Anyone have any suggestions how to proceed?

**************************

running install

running bdist_egg

running egg_info

writing pyodbc.egg-info/PKG-INFO

writing top-level names to pyodbc.egg-info/top_level.txt

writing dependency_links to pyodbc.egg-info/dependency_links.txt

reading manifest file 'pyodbc.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

warning: no files found matching 'tests/*'

writing manifest file 'pyodbc.egg-info/SOURCES.txt'

installing library code to build/bdist.linux-x86_64/egg

running install_lib

running build_ext

building 'pyodbc' extension

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYODBC_VERSION=3.0.7 -I/usr/include/python2.6 -c /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp -o build/temp.linux-x86_64-2.6/home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.o -Wno-write-strings

In file included from /home/rbrook/pyodbc-3.0.7/src/pyodbcmodule.cpp:12:

/home/rbrook/pyodbc-3.0.7/src/pyodbc.h:41:20: error: Python.h: No such file or directory

/home/rbrook/pyodbc-3.0.7/src/pyodbc.h:42:25: error: floatobject.h: No such file or directory

/home/rbrook/pyodbc-3.0.7/src/pyodbc.h:43:24: error: longobject.h: No such file or directory

*********************



Tom Lockhart

unread,
Oct 22, 2014, 12:19:24 PM10/22/14
to django...@googlegroups.com
On Oct 22, 2014, at 9:12 AM, robert brook <software....@gmail.com> wrote:


I have alot of experience installing packages on windows and mac and it goes very smoothly.
I do not have alot of experience doing the installs on a Linux box.

I am running into problems installing 4 packages.

The Lan team tried yum, but the basic django packages were not available.

Use yum to install python and virtualenv and the rest should go easily using a virtualenv setup.

This is commonly recommended for the other platforms also.

hth

- Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83a1d410-9cc1-4841-a517-1895ba220179%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Please consider the environment before printing this message.
This message may be privileged and/or confidential, and the sender does not waive any related rights and obligations.  Any distribution, use or copying of this message or the information it contains by other than an intended recipient is unauthorized.  If you received this message in error, please immediately advise me by return e-mail or phone.  All information, references, images, programs, source code, or other materials whatsoever contained in, or supplied with, this document are TRADE SECRETS and governed by the Uniform Trade Secrets Act.  User assumes all direct and consequential liabilities and costs that result from any unauthorized disclosure or use of this information.

Pat Claffey

unread,
Oct 22, 2014, 12:53:08 PM10/22/14
to django...@googlegroups.com
Hi,
I assume you have python installed successfully.  What version?  If you install python 3.4 then pip should install automatically (unless  3.4. is a second python install in which case pip does not install)

You should be able to see the python (and pip) executables in /usr/bin or /usr/local/bin.  For example on my system I see python2.6 and pip installed on /usr/bin (python is just a link to python2.6).  I manually installed python3.4 and pip3.4.  I see these executables in /usr/local/bin.

python2.6 was pre-installed on my linux box (red hat).  I installed python3.4 and pip3.4 manually.

robert brook

unread,
Oct 22, 2014, 12:53:27 PM10/22/14
to django...@googlegroups.com
I have installed a virtualenv on my local machine to do the development.

On the development web server using a virutal environment is not really important.

The packages that I am interested in are not available through yum.

Trying to install the packages locally displays header errors.

Any suggestions around this?

Pat Claffey

unread,
Oct 22, 2014, 12:55:26 PM10/22/14
to django...@googlegroups.com
once I got pip sorted out it was really easy install django (just pip install django)  - so advise is to get pip working.  You will need it for other python packages also.


On Wednesday, October 22, 2014 5:12:10 PM UTC+1, robert brook wrote:

robert brook

unread,
Oct 22, 2014, 12:57:17 PM10/22/14
to django...@googlegroups.com
I have python 3.3.

Had to coerce red hat to do allow the install  3.3.  Must have been  a stripped down version.
version 6 came with python 2.6 installed.

Must be a stripped down version as pip does not come with python 3.3

I believe I need the package , python3.3-dev, to get the headers to utilize the std   setup.py install

I am going to follow up with Red Hat.

Thanks

robert brook

unread,
Oct 22, 2014, 12:59:32 PM10/22/14
to django...@googlegroups.com
I am a contractor in a large organziation.  They must have everything locked down.

I downloaded get-pip.py and got errors that seemed to be proxy, firewall security issues, that is why I fell back to implementing through setup.py
and ran into the header issues.

Thanks

Pat Claffey

unread,
Oct 22, 2014, 1:44:08 PM10/22/14
to django...@googlegroups.com
One final suggestion...

If you are using python3.3 then pip may be called pip3.3

You could try "which python3.3"  or  "which python" (if python points to python3.3).  This should give you path to python executable directory.  If you look there you may be lucky
and see a pip executable - perhaps pip3.3

Regards,
pat


On Wednesday, October 22, 2014 5:12:10 PM UTC+1, robert brook wrote:

Kelvin Wong

unread,
Oct 22, 2014, 10:59:17 PM10/22/14
to django...@googlegroups.com
Take a look at the Software Collections (ver 1.1 works on RHEL 7)



$ sudo yum install python33-python-devel
$ scl enable python33 bash

You can then install everything locally in your application user's home directory.

This snip is from a virtualenv build script. I use virtualenvs on my deployments.

$ curl https://bootstrap.pypa.io/get-pip.py | python3.3 - --user
$ echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.bash_profile
$ source ~/.bash_profile
$ which pip
/home/youruser/.local/bin/pip

$ pip install --user virtualenv virtualenvwrapper
$ echo 'source $HOME/.local/bin/virtualenvwrapper.sh' >> $HOME/.bash_profile
$ source ~/.bash_profile

K

Thomas G Lockhart

unread,
Oct 23, 2014, 10:40:08 AM10/23/14
to django...@googlegroups.com
On Oct 22, 2014, at 9:57 AM, robert brook <software....@gmail.com> wrote:

I have python 3.3.

If you are running RHEL6, python 2.6 is supported through yum etc. You will need to do your own installation if you want a more recent version, but afaik you will not need to. 2.6 is sufficient. If it were me, “good enough” would be good enough.

I’ve installed the CentOS and EPEL yum configurations on my RHEL6 boxes and one of those repos has virtualenv if RHEL6 does not have it (I don’t have access atm to check).

RHEL6 is reputed to break badly if you *replace* python with a newer version, so you will need to preserve the 2.6 installation anyway.

If you do your own from-source python installation then you can pull that build into your virtualenv without difficulty.

hth

- Tom


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages