Re: Python 3.7 setuptools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17. 04. 19 19:19, Adam Williamson wrote:
On Wed, 2019-04-17 at 17:54 +0100, Luke Hinds wrote:
On Wed, Apr 17, 2019 at 5:34 PM Luke Hinds <lhinds@xxxxxxxxxx> wrote:

Apologies if not the correct, list , I was not sure if I should post here
or to python-devel

I would like to use setuptools within a python3.7 project.

I install ptyhon3.7 using dnf

I then install python3-setuptools

Using python3.7 I get an import error:

# python3.7
Python 3.7.2 (default, Jan 19 2019, 10:24:44)
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import setuptools
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'

It works for 3.6

# python3
Python 3.6.5 (default, Mar 29 2018, 18:20:46)
[GCC 8.0.1 20180317 (Red Hat 8.0.1-0.19)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import setuptools


This is expected, as set up tools resides in
`/usr/lib/python3.6/site-packages/setuptools`

What would be the tidy / recommended way of using a module for 3.7 with
dnf managing the packages (rather than pip / virtual-envs).



To answer myself, I omitted to state I was using Fedora 29.

Fedora 30 resolves this for me, as 3.7 is the default.

I would still however, be interested in what the recommended approach is
for users on Fedora 29.

Fedora 29 has 3.7 as the "python3" version.
Fedora 28 has 3.6 as the "python3" version.

There kind of isn't one. The alternative-versioned Python interpreter
packages exist for specific purposes like doing CI; we don't ship a
complete library environment for those versions. Whatever you're doing
with them is actually expected to get libraries and stuff some other
way...probably pip and virtualenvs. :P This is AIUI, anyway.

Exactly.

Note that you can do:

  $ python3.X -m ensurepip --user

(Or, if you absolutely need to make it available for root:)

  # python3.X -m ensurepip

To unpack pip and setuptools (we ship them with Python 3.X as a dependency).

https://docs.python.org/3/library/ensurepip.html

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux