Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import powerline package on Arch #298

Closed
Lokaltog opened this issue Mar 8, 2013 · 17 comments
Closed

Unable to import powerline package on Arch #298

Lokaltog opened this issue Mar 8, 2013 · 17 comments

Comments

@Lokaltog
Copy link
Member

Lokaltog commented Mar 8, 2013

Users report having to add PYTHONPATH=/usr/lib/python3.3/site-packages to their /etc/profile to get Powerline working on Arch Linux.

@Lokaltog
Copy link
Member Author

Lokaltog commented Mar 8, 2013

Added to installation instructions for python-powerline-git in 154d1ae.

@j4cko
Copy link

j4cko commented Mar 16, 2013

Maybe one should rather change that to
PYTHONPATH=$PYTHONPATH:/usr/lib/python3.3/site-packages
for those who still need to use python2 and therefore have a different pythonpath set (setting it to python3.3 broke wicd in my case)

@eyenx
Copy link

eyenx commented Mar 29, 2013

Wouldn't it be better to just put

let $PYTHONPATH="/usr/lib/python3.3/site-packages"

into the .vimrc?

Exporting the $PYTHONPATH Environment variable broke all my python2 dependent programs.

@Lokaltog
Copy link
Member Author

Lokaltog commented Apr 2, 2013

I'll do a bit of investigation later and see what works best. I've not been able to reproduce this issue so I have no ETA on when I'll be able to fix it. If anyone has a solution that works for everyone (with both Python 2 and 3) let me know and I'll update the docs.

@tjanson
Copy link

tjanson commented Apr 26, 2013

I second j4cko’s experience: The original instructions break wicd and possibly other programs. gnomeye’s suggestion works for me.

@pablox-cl
Copy link

Yep, altering PYTHONPATH also broke some python2 apps (udiskie in my case) in Arch Linux.

@j4cko solution didn't work because on my system there's no default $PYTHONPATH.

@gnomeye instrucctions also worked for me :)

@ZyX-I ZyX-I removed this from the Initial release milestone Aug 15, 2014
@ZyX-I ZyX-I added the linux label Aug 22, 2014
@ZyX-I
Copy link
Contributor

ZyX-I commented Sep 20, 2014

Closing this as it looks more like Arch linux or Arch linux powerline package bug and last reply was a year ago.

@ZyX-I ZyX-I closed this as completed Sep 20, 2014
@pablox-cl
Copy link

Indeed, it's not a powerline issue, in any case another user come into this issue, the solution is throw this:

let $PYTHONPATH="/usr/lib/python3.3/site-packages" 

...on your .vimrc file.

@Firef0x
Copy link

Firef0x commented Oct 14, 2014

@Lokaltog @ZyX-I hope you could delete this line or replace it with some other workarouds. I followed this instruction in PKGBUILD without any warning in the comments of AUR, and I got an error when trying to run a Python2 app as sole/aafm#61 describes. I spent a day trying to locate the problem and finally it leads me to this issue.

Thanks and regards!

@ZyX-I
Copy link
Contributor

ZyX-I commented Oct 14, 2014

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On October 14, 2014 9:55:05 PM GMT+03:00, Fernando Gilberto Pereira da Silva notifications@github.com wrote:

@Lokaltog @ZyX-I hope you could delete this
line

or replace it with some other workarouds. I followed this instruction
in PKGBUILD without any warning in the comments of AUR, and I got an
error when trying to run a Python2 app as
sole/aafm#61 describes. I spent a day trying
to locate the problem and finally it leads me to this issue.


Reply to this email directly or view it on GitHub:
#298 (comment)

It is wrong place to complain: Arch package is not maintained here. Wondering why it does not "just work": I never had similar problems in Gentoo, though powerline is installed system-wide for 2.7, 3.2 and 3.3 (used to have 2.6 as well) at once.
-----BEGIN PGP SIGNATURE-----
Version: APG v1.1.1

iQJNBAEBCgA3BQJUPXDuMBwfMDI7PjIgHTg6PjswOSAQOzU6QTA9NEA+MjhHIDxr
cC1wYXZAeWFuZGV4LnJ1PgAKCRBu+P2/AXZZIoE2EACYHYJzry8Ujw3b9kJ2CcDA
UHKSZnOuhaytCs2YIvZ5423CXHRa18rA60tuNEKiPpzpEVv79ltBYBSWrLsR3B5o
pQr7lC77D4G/C9/L60efkTKDOKTRjHSsz2dNg6jTf2odTAxTT5CnKmm50Jwd6bEO
mcWFT2sXbiLIsWgL30dOKGHAF2YniD7waqPSiF4I1tXY8JFYIL2gDLo6rmw4mlnw
nS8MTtAW4gR+WnRUvwqSTr1wiE9hyd3b3wcIVmse01t3I/+MfpdSKYvGfBF30DLR
KdtdSdBeQ/jmIeP3qAvQxGrswofIgkPolBiR6f81688EZ2WRN8thAJoyGFOKzOs0
6bbV2JlNRw1LMNwH/RV0hNUwyMhGIpbrpPo6F7x/vGZi5B0Y5rlIe2v8AdPjZENm
QXbDsU5NEG4nujpU0TQMLj4XLO7P1zDeiKD0M4OAB1S6kWsrBLs2AUtlYZxlWa5R
oUvmh2ooGrRYxydZUkCFB72M4ji4tICTvfOjnf9K9yH2DHgFQ8RrvbyBjFIS/4Ap
NSmrx885G/vSqwsLRWO9d40Kfsb9CejjMxSDYcHC1oOL8Oy9gIGfPbT/7tWCxd2r
wqOpblDuTTGxwcPKvnTu1p1RGMjmT6dOpifcGt0Dmq9xDSi92I3SX0UmGUKhxZPA
Kn2kLBDkw3919iuL5tOR/Q==
=/B2Q
-----END PGP SIGNATURE-----

@ZyX-I
Copy link
Contributor

ZyX-I commented Oct 14, 2014

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On October 15, 2014 12:38:05 AM GMT+03:00, Fernando Gilberto Pereira da Silva notifications@github.com wrote:

Since @Lokaltog is inactive in AUR since January 2014, he didn't even
change the PYTHONPATH from python3.3 to python3.4 . And I want to
warn people for what would happen after setting PYTHONPATH, this
issue may be one of the right place to talk.


Reply to this email directly or view it on GitHub:
#298 (comment)

He is not active here either. You should probably contact him via email from github profile if you want any changes: I am neither using Arch nor maintaining its packages.

I doubt very much that a closed issue is the right place to warn.
-----BEGIN PGP SIGNATURE-----
Version: APG v1.1.1

iQJNBAEBCgA3BQJUPYyOMBwfMDI7PjIgHTg6PjswOSAQOzU6QTA9NEA+MjhHIDxr
cC1wYXZAeWFuZGV4LnJ1PgAKCRBu+P2/AXZZIry+D/9GRMt2j2aN2K8yykpSydJD
ATIoT6ATPsR7WlcMt63aKNBzkFqpjrZBT7+jo8LCBtXRwKaY/vCuFsLz1fQnRVTa
RMJFm3RQEoydeEDY7dv0hM8EFJPs9dyqibz4/M4aRADI6n8VnGoQj9iarqlnn003
fKm9B7VpFFfnfRSdvXnWhoj58MxwhPz1yCfD2swKWRKzWraC6nkQa1UGBHH3SlB+
Ic+sZm7UXjt21aLE/nRZa7phKXPT7phWxPS09Hv0FlHuLPDw427qxjeAbOg4au31
zspYOrE5ljI5+F/iW3VtenaIlJiSg4sY0kMcObbV6oTfDI9ywK0K+ZZ7EuHwaN03
nFtcHOtG13LzTQW3G1XrK20Ky46zbEjv7OitfN5zqBmHRmRLmKfJDIJcSu5e94Ll
fi7DX3+uf9aQ3H3OTj1SCyfAXEyGZ1lijYHCfmxJEcCOafYE4vOfDr6H8Bi6lOxo
qQ6gpSrK0XPUYtesdMA9TYs2dRlyU8SLCK9hjWh4zq5uZbniI8c9n+h1irsAe+Y8
35XjECASZj/rs5fWhapjuLJ82Hy7hnFnYmVwJVHHtlsO0WawKPJNnq3o42dYi0ur
pSvm1O+rxuMuLxQkbZlmeKC3ItTEgsFhKvmntxJAuzLMEUxd8WacMYZuHtGMHewX
ubVHeUrOCbT6pcFEF1bXGw==
=JaRg
-----END PGP SIGNATURE-----

@Firef0x
Copy link

Firef0x commented Oct 14, 2014

It is wrong place to complain: Arch package is not maintained here.

Since @Lokaltog is inactive in AUR since March 2014, he didn't even changed the PYTHONPATH from

export PYTHONPATH=/usr/lib/python3.3/site-packages

to

export PYTHONPATH=/usr/lib/python3.4/site-packages

And I just want to warn people for what would happen after setting PYTHONPATH, this issue may be one of the right places to talk.

Wondering why it does not "just work": I never had similar problems in Gentoo, though powerline is installed system-wide for 2.7, 3.2 and 3.3 (used to have 2.6 as well) at once.

I am wondering too. I think /usr/lib/python3.4/site-packages is included in sys.path in Python 3 and doesn't need to be described again in PYTHONPATH

Python 3.4.2 (default, Oct  8 2014, 13:44:52) 

>>> import sys
>>> print(sys.path)
['', '/usr/lib/python3.4/site-packages', '/usr/lib/python34.zip', '/usr/lib/python3.4', '/usr/lib/python3.4/plat-linux', '/usr/lib/python3.4/lib-dynload']

What's more, after I removed the line

export PYTHONPATH=/usr/lib/python3.4/site-packages

from my /etc/profile, powerline still works good so far. Maybe this issue is fixed in my environment and the ugly PYTHONPATH workaround isn't needed for now. (Though I am not sure)

I am neither using Arch nor maintaining its packages.

Yes, I know. Thx for your reply anyway.

Thanks and regards!

@Lokaltog
Copy link
Member Author

Although I'm no longer actively helping develop this project (both because I'm no longer using vim or any of the apps for Powerline, and because of limited time for spare time development) I still subscribe to e-mail notifications and I try to keep up with what's going on in the project. I'm really impressed about all the work @ZyX-I has put into this project, so it's fun following it.

Since @Lokaltog is inactive in AUR since March 2014, he didn't even changed the PYTHONPATH from

I apologize for that, I must have missed the AUR comments about the Python path in the AUR package. I had no idea it was an issue. I'd be happy to transfer the packages to someone else who's actively using the project if someone's up for the task. The packages are maintained in my powerline-pkg-archlinux repo.

I'll remove the Python path message completely from the package to remove any confusion. IIRC this workaround was necessary at some point ages ago, but it looks like it has caused more issues than it has solved so I think removing it should work fine since it works for you without the explicit PYTHONPATH too.

Lokaltog added a commit to powerline/pkg-archlinux that referenced this issue Oct 15, 2014
@pablox-cl
Copy link

@Lokaltog, I'm still using arch, vim and powerline too, so I can adopt the packages on the AUR if you orphan them :)

@Lokaltog
Copy link
Member Author

Thanks a lot! I've orphaned the packages, feel free to adopt them :)

@pablox-cl
Copy link

Adopted them :).

Anyway, I insist that the only thing it should be made (if any) is set $PYTHONPATH from vim.

@pablox-cl
Copy link

Oh, sorry the double posting. Btw, should I continue using your repo for keeping track of the package state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants