Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] portage/python totally broken?...
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
gr0x0rd
Guru
Guru


Joined: 12 Aug 2006
Posts: 311

PostPosted: Thu Jul 14, 2016 3:53 am    Post subject: [SOLVED] portage/python totally broken?... Reply with quote

Hi all,

I will admit, I have not used or sync'd portage in many moons. Firefox seemed a bit slow loading certain pages, so I thought it might be a good time for an update. So I tried syncing portage...
Code:
gr0x0rd@teletran4 ~ $ sudo emerge --sync
usage: emerge [options] requirement_or_url ...
   or: emerge --help

error: option --sync not recognized
Well that's different... my system had been up for 182 days. Using many Microsoft products at work, I decided a reboot might be good for the system. After logging back in, I noticed compiz wouldn't run due to some python error:
Code:
gr0x0rd@teletran4 ~ $ error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/lib64/python3.3/site-packages/test-easy-install-12754.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/lib64/python3.3/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
I then tried running portage again, but got the same error. It seems to get worse:
Code:
gr0x0rd@teletran4 ~ $ sudo emerge --info
usage: emerge [options] requirement_or_url ...
   or: emerge --help

error: option --info not recognized

gr0x0rd@teletran4 ~ $ sudo emerge -av portage
Searching for portage
Skipping development or system egg: portage 2.2.14
Reading https://pypi.python.org/simple/portage/
Couldn't retrieve index page for 'portage'
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for portage
error: Could not find suitable distribution for Requirement.parse('portage') (--always-copy skips system and development eggs)
I thought maybe the version of python I was running had gotten corrupted, so I switched. That didn't make any difference. I switched back to its previous setting:
Code:
gr0x0rd@teletran4 ~ $ sudo eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.3 *
  [3]   python3.4
Not gonna lie. In the last 2 years I have built a house and had a child. My gentoo game is not as strong as it once was. Trying to think of a way to salvage my system, but it's not looking good. Any help or suggestions are welcome!
_________________
~g
emerge -FML...


Last edited by gr0x0rd on Thu Jul 21, 2016 2:57 am; edited 1 time in total
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Thu Jul 14, 2016 6:28 am    Post subject: Reply with quote

ok, the first part is sounding like python-exec got broken (if you used pip, that is the most common way to break python-exec and portage).

Try running this:
Code:
# /usr/lib/python-exec/python2.7/emerge --oneshot python-exec

Note: You can modify the 2.7 for which ever version of python portage was compiled for.

Assuming you still have the source file for the installed version of python-exec, this should reinstall python-exec and hopefully fix that issue.

Now the part of not updating your system, is going to give you significant issues. Quite frankly, trying to update a old system is a difficult process and time consuming. Depending on exactly how long it's been since you last updated; you are better off reinstalling (a couple months is manageable, but 4+ months, it gets progressively more difficult the older it gets).
Back to top
View user's profile Send private message
dol-sen
Retired Dev
Retired Dev


Joined: 30 Jun 2002
Posts: 2805
Location: Richmond, BC, Canada

PostPosted: Thu Jul 14, 2016 7:03 am    Post subject: Reply with quote

If you are going to install something using pip, then do it as a user only!!!! NEVER as the root user!!!

Or you get the breakage you experienced.

If you want packages from pypi installed, then use app-portage/g-sorcery with the pypi backend package app-portage/gs-pypi.

It can generate partial or complete pypi package overlays that can be installed via emerge. You can even use g-sourcery from layman to generate a pypi overlay and sync it via layman commands.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jul 14, 2016 7:51 pm    Post subject: Reply with quote

Whatever that "emerge" command you're running is, it's definitely not the one from portage. emerge --version would say for certain.
Back to top
View user's profile Send private message
gr0x0rd
Guru
Guru


Joined: 12 Aug 2006
Posts: 311

PostPosted: Fri Jul 15, 2016 3:02 am    Post subject: Reply with quote

Brilliant! I thank you sir, it looks like I am able to emerge --sync.

I couldn't agree more about updating a old system. I emerged firefox-bin long ago so I could limit the dependencies. It's been amazing how wondefully stable this incarnation of my system has been, primarily because I haven't been updating any packages :D

Cheers,
_________________
~g
emerge -FML...
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