Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python3 giving problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
NTwoO
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2007
Posts: 75

PostPosted: Fri Feb 16, 2018 9:12 am    Post subject: Python3 giving problems Reply with quote

In emerging my packages, python3 seems to give issues. During an emerge -vuD world I get harfbuzz failing with:
Code:

File "/usr/lib64/python3.5/subprocess.py", line 127, in <module>
    import _posixsubprocess
ImportError: dynamic module does not define module export function (PyInit__posixsubprocess)


eselect python list is
Code:

Available Python interpreters, in order of preference:
  [1]   python2.7
  [2]   python3.4
  [3]   python3.5


If I set 3.4 or 3.5 as the first to be selected, then emerge also fails to start with:
Code:
 
# emerge -vuD world
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/emerge", line 7, in <module>
    import platform
  File "/usr/lib64/python3.5/platform.py", line 117, in <module>
    import sys, os, re, subprocess
  File "/usr/lib64/python3.5/subprocess.py", line 127, in <module>
    import _posixsubprocess
ImportError: dynamic module does not define module export function (PyInit__posixsubprocess)


I'm now runnig a python-updater to see if it solves any problems.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 541
Location: Germany

PostPosted: Mon Feb 19, 2018 12:12 pm    Post subject: Reply with quote

It can be, that your environment contains PYTHONPATH that points to libraries for Python 2. Those are not compatible with Python 3, so they can not be properly used. At least here https://bbs.archlinux.org/viewtopic.php?id=226314 the person was getting the same error as you and had to clear the above variable.
Back to top
View user's profile Send private message
NTwoO
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2007
Posts: 75

PostPosted: Tue Feb 20, 2018 7:49 am    Post subject: Reply with quote

Sounds plausable. I'll have a look
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Feb 20, 2018 8:40 am    Post subject: Reply with quote

If you have out-of-tree python stuff installed as a normal user, running portage under "su -" might help.
Back to top
View user's profile Send private message
NTwoO
Tux's lil' helper
Tux's lil' helper


Joined: 01 Jun 2007
Posts: 75

PostPosted: Sun Feb 25, 2018 1:38 pm    Post subject: Reply with quote

Found the problem. I am busy with a course in robotics and installed ROS on the system that set PYTHONPATH and nuked the rest.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum