how to install python-devel for 2.6 version? - python

i use centos 5.4 ,the default python version is python2.4,so i use the python2.6.2.tar.gz compile a python 2.6 version
and now i want to intstall board review project it need install python-devel package,if i use
yum install python-devel,it will install the python2.4 relevent version python-devel,
how could i get a python2.6 version devel package install?

If you enable the EPEL repo, you can install python 2.6 and the devel headers using yum:
# yum install python26
# yum install python26-devel
These packages won't then conflict with the python 2.4 ones.

Looks like it is more system administration than it should be required. Here are some helpful pointers:
http://blog.milford.io/2010/08/new-method-for-installing-python-2-6-4-with-mysql-python-on-centos-5-5/
How to install python2.6-devel package under CentOs 5
However, if you are just installing reviewboard software, you can go to http://www.python.org download the package, do a ./configure, make and make altinstall to a local version and then point that interpreter to your reviewboard download's setup.py file.

Related

How can I check if pip can find python dev headers?

I'm trying to install Mujoco on a Ubuntu server and have a problem which very much looks like this: https://github.com/openai/mujoco-py/issues/265
The solution in that issue thread is to install the devel version of python3. Apparently that brings in python.h which is needed by Mujoco.
But things are complicated: I don't have root access on the machine. Pip comes from a conda environment and even on conda-forge, I don't see any dev version of python (Equivalent of apt-get install python3.6-dev for conda)
The installation guide for the server installs some packages with linuxbrew. There is a python package on brew and apparently it automatically ships with the python devel version: how to install python-devel in Mac OS?
Now I have anaconda python and brew python. How can I see which paths are picked up by pip and verify if it sees the python dev headers ?

wxPython installation on ubuntu 16.04 taking very long time

I am trying to install wxPython on ubuntu 16.04 for python3 using pip3, but after downloading the requirements it stuck in installing it. I have installed the required development packages and their dependencies as mentioned here.
It takes a long time to build, be patient and it will probably make it through if the needed library dependencies are installed. You can use the --verbose flag on pip to see what it is doing along the way.
Alternatively, there are already wheel files available for Ubuntu 16.04, see https://wxpython.org/pages/downloads/
As suggested by RobinDunn use Linux Wheels:
pip install -U \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
wxPython
sudo apt install python3-wxgtk4.0
package in Ubuntu 20.04 which will get you version 4.0.7. Works also 22.04

How to install urllib3[secure] without pip

I have a old RHEL5 box running python 2.7 and I have to do a local install as the regular python site-packages are on a NFS filer I cannot write to. I need to install urllib3 and according to this doc: https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2
I should execute:
pip install urllib3[secure]
But I cannot figure out how to get pip to install one of my local filesystems. I have done ...
python setup.py install --prefix=/apps/local_packages
But I do not know how to get the "secure" install using setup.py.
python setup.py install[secure] --prefix=/apps/local_packages
doesn't work.
You can install pip by using get-pip from documentation.
And [secure] is using for install dependencies starting from 1.11 (2015-07-21) version

How to install python-devel when using virtualenv

Before asking my question, let me introduce my computing environment first.
OS: Red Hat Enterprise Linux Server 6.5.
Python: Python 2.6 (by rpm install), Python 2.7 (based on virtualenv)
Question:
I want to install a library that requires python-devel. However, when using
yum install python-devel
The system installs python-devel-2.6.*, because the installed (yum-packaged) python is version 2.6. My question is , how to install python-devel that matches the version of the python in virtualenv (which is version 2.7 in my case).
Thanks!
This question has nothing to do with pip or virtualenv. python-dev is a Linux system package, not something you install with pip. You just need to explicitly install python-devel-2.7 - you can search your distribution's package repository for the exact package name.

pycurl module not available after installation on Snow Leopard

I'm running Python 2.6.4 on Mac Snow Leopard. I installed pycurl using:
sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.16.2.1
The installation completes with no issues and says pycurl is installed in subsequent installation attempts. However, when I try to "import pycurl" in a script, I get a message that pycurl isn't found. I'm not sure what else to do to fix this.
I would suspect you have 2 versions of python on your system. How about removing easy install and reinstalling it.
Remove the current easy install script by typing which easy_install and then rm [easy install full path].
To install easy install
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
Then, try your command again:
sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.16.2.1
I guess you have 2 different versions of python, you can find out by running command which python
If you have installed Python 2.6.4 using the python.org OS X installer, you need to install the optional 10.4u SDK from the 10.6 Xcode mpkg to install any python packages that include C extension modules.

Categories