Python.h file missing and python devel is ever install but no python laster version install by system

Hello,

Python.h file missing and python devel is ever install but no python laster version install by system…

I have ever sync rpm from rpm find web page and from python web page zip installing but libxml2 keep miss Python.h file,

The libxml2 support gitlab answer to myself this is a distribution error !

Thank you in advance to repair the python problem,

Regards.

Azaretdodo

@azaretdodo, Welcome to the Fedora Community.

If you’ve not had a chance yet, please look at the #start-here category. It has some very useful information on using the forum and tips on Fedora usage.

What package did you try to install? Is it python3-devel?

A quick dnf search got me the following result

[t0xic0der@ToxicDragon ~]$ sudo dnf search libxml2
Last metadata expiration check: 0:33:43 ago on Sun 24 May 2020 11:43:47 PM IST.
======================== Name Exactly Matched: libxml2 =========================
libxml2.x86_64 : Library providing XML and HTML support
libxml2.i686 : Library providing XML and HTML support
======================= Name & Summary Matched: libxml2 ========================
libxml2-static.i686 : Static library for libxml2
libxml2-static.x86_64 : Static library for libxml2
python3-libxml2.x86_64 : Python 3 bindings for the libxml2 library
mingw32-libxml2.noarch : MinGW Windows libxml2 XML processing library
mingw64-libxml2.noarch : MinGW Windows libxml2 XML processing library
perl-Alien-Libxml2.x86_64 : Install the C libxml2 library on your system
============================ Name Matched: libxml2 =============================
libxml2-devel.i686 : Libraries, includes, etc. to develop XML and HTML
                   : applications
libxml2-devel.x86_64 : Libraries, includes, etc. to develop XML and HTML
                     : applications
mingw32-libxml2-static.noarch : Static version of the MinGW Windows XML
                              : processing library
mingw64-libxml2-static.noarch : Static version of the MinGW Windows XML
                              : processing library
=========================== Summary Matched: libxml2 ===========================
perl-XML-LibXML.x86_64 : Perl interface to the libxml2 library
libxml++.x86_64 : C++ wrapper for the libxml2 XML parser library
ghc-libxml-sax.x86_64 : Haskell bindings for the libxml2 SAX interface
libxml++.i686 : C++ wrapper for the libxml2 XML parser library
libxml++30.i686 : C++ wrapper for the libxml2 XML parser library
libxml++30.x86_64 : C++ wrapper for the libxml2 XML parser library
mingw32-libxml++.noarch : MinGW Windows C++ wrapper for the libxml2 XML parser
                        : library
mingw64-libxml++.noarch : MinGW Windows C++ wrapper for the libxml2 XML parser
                        : library
python3-lxml.x86_64 : XML processing library combining libxml2/libxslt with the
                    : ElementTree API
[t0xic0der@ToxicDragon ~]$ 

I think there are packages available in the repo which can satisfy your usecase.

1 Like

Hello,

Yes I talk about python devel,

But it seems python isn’t install I have search a python installed with grep without find a python installed,

The libxml2 I talk is a github installing,

Advice you I install any or some dnf near libxml2?

Thank you in advance for your answer,

Regards.

Dorian Rosse.

Envoyé d’Outlook Mobile

Can we have the output of

rpm -qa \*python\*devel\* 

please?

Hello,

It go out Nothing your command line asked :

with slash instead backslash too,

Thank you in advance for your help for repair the problem,

Regards.

Azaretdodo.

Then you do not have the required package installed. Please use:

sudo dnf install python3-devel

and that will install the necessary files required for developing against Python, including the header you are looking for.

2 Likes

Regarding the version of libxml2, it can be pretty much controlled from pip.

Check this out - You need not rely on dnf if you feel you are not getting the appropriate version of libxml2 there. I made a search in the pip database and there is tons to choose from.

[t0xic0der@ToxicDragon ~]$ pip3 search libxml2
libxml2-python3 (2.9.5)    - libxml2 package
libxml2-python (2.6.21)    - libxml2 and libxslt package
m3-libxml2-python (2.6.9)  - libxml2 and libxslt package
plone.recipe.lxml (0.4)    - Recipe that builds lxml and dependencies
                             (libxslt, libxml2).
libxml2dom (0.5)           - PyXML-style API for the libxml2 Python bindings
lxml (4.5.1)               - Powerful and Pythonic XML processing library
                             combining libxml2/libxslt with the ElementTree
                             API.
  INSTALLED: 4.4.1
  LATEST:    4.5.1
lxml-odidev (4.5.0)        - Powerful and Pythonic XML processing library
                             combining libxml2/libxslt with the ElementTree
                             API.
webio (0.1)                - Make sure to have libxml2 devel for lxml  sudo
                             yum install libxml2-devel libxslt-devel  From
                             root:     sudo python setup.py install --record
                             setup/setup.txt      To uninstall:     sudo cat
                             setup/setup.txt | xargs rm -rf

Good luck :smile:

Hello Francisco,

I have ever dnf search and pipe grep python devel for find this program installed but they haven’t a python program lang laster installed no python 3.7 or python 3.8 installed by dnf,

They have ever python2-devel and python3-devel but they haven’t laster python devel or python program lang laster as python 3.7 or 3.8…

If I search python I am advice to use pipe more because they have too much python scripts!

I think the problem went by fedora system because I have ever installed all rpm program near python but they haven’t python compile by rpm or dnf,

You must let my system compile python program,

Thank you in advance to hear myself,

Regards.

Dorian Rosse.

Envoyé d’Outlook Mobile

I’m not sure I understand you. Python is not a compiled language at all, so all you need is the interpreter. If one is developing against python, one needs to install the development files, which are included in python3-devel. python3 in Fedora is the version that is used for the release. For Fedora 32, it is python3.8:

$ python3 --version
Python 3.8.3

This is your “system installation” of python. Since there cannot be multiple “system installations” of Python versions, if you are looking to develop against another version of python, you must set up a virtual environment and do it there.

This applies to all python packages. However, you should mention that if people use pip, they should do it in a virtual environment so that it does not affect the system installation of Python which is needed by all the applications installed in Fedora, including dnf.

1 Like

yes Francesco have the Truth I have dnf install python3-devel then I have success to install the libxml2 GitHub :slight_smile:

I think you can close the ticket,

Thank you for your help :slightly_smiling_face:

Regards.

Azaretdodo.

Right @FranciscoD.

@azaretdodo, Here is a run through of how you can activate virtual environment (if you plan to use it someday)

  1. Install pip3 install virtualenv --user and create a virtual environment using virtualenv <VIRTUAL-ENVIRONMENT-NAME> after making the project folder your present working directory.
  2. Activate the virtual environment by executing source <VIRTUAL-ENVIRONMENT-NAME>/bin/activate and then all pip3 installations would be restricted to this environment only.
  3. When you are done with the stuff, simply come out of it by executing deactivate in the virtual environment prompt.
1 Like

Python 3 includes virtual environments, so you can just use this:

https://docs.python.org/3/tutorial/venv.html

$ python3 -m virtualenv new
Using base prefix '/usr'
New python executable in /home/asinha/new/bin/python3
Also creating executable in /home/asinha/new/bin/python
Installing setuptools, pip, wheel...
done.

The activate with `source ...`.

If you’d like to use a virtual environment manager, pew is a good one:

$ sudo dnf install pew
$ pew new new-virtuanenv
# For more information on pew:
$ man pew
2 Likes

Hello,

Sorry but what is better with a virtual Environnement instead a real environnement ?

Thank you in advance for your answer,

Regards.

Azaretdodo.

Envoyé d’Outlook Mobile

virtual environments allow you to have independent development spaces where you can install the necessary dependencies without causing conflicts between each other. Please read the tutorial to learn more. This isn’t quite within the scope of this forum :slight_smile:

https://docs.python.org/3/tutorial/venv.html

1 Like

Hello Francisco,

Thank you for your link I will read it and saved on my laptop,

Have a nice day from France,

Regards.

Azaretdodo.

Envoyé d’Outlook Mobile

1 Like

Wasn’t RHEL the enterprise distro with 24/7 individual support?

1 Like

Aye, @azaretdodo, just a note mostly for the benefit of newcomers that may see this thread: this isn’t a ticket in the traditional sense of a “support ticket” that you file when you contact your IT people for support. This is a forum where community members spend their free time to voluntarily help each other.

2 Likes

Yes. “Friends” is one of the Fs in Fedora. :wink:

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.