* python readline module @ 2015-12-20 17:22 Federico Beffa 2015-12-20 22:38 ` Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Federico Beffa @ 2015-12-20 17:22 UTC (permalink / raw) To: Guix-devel Hi, it appears that our 'python' package, despite having 'readline' among its inputs, can't use it: Python 3.4.3 (default, Jan 1 1970, 00:00:01) [GCC 4.9.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> >>> import readline, rlcompleter Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'readline' >>> Is any special step required? Regards, Fede ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: python readline module 2015-12-20 17:22 python readline module Federico Beffa @ 2015-12-20 22:38 ` Ludovic Courtès 2015-12-21 9:12 ` Federico Beffa 0 siblings, 1 reply; 6+ messages in thread From: Ludovic Courtès @ 2015-12-20 22:38 UTC (permalink / raw) To: Federico Beffa; +Cc: Guix-devel Federico Beffa <beffa@ieee.org> skribis: > it appears that our 'python' package, despite having 'readline' among > its inputs, can't use it: It Works for Me: --8<---------------cut here---------------start------------->8--- $ guix environment --container --ad-hoc python -- python3 substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0% La jenaj derivoj estos elŝutataj: /gnu/store/13n8xbi9wv9pigfyhir007qadr81jq46-python-3.4.3 /gnu/store/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk Found valid signature for /gnu/store/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk From http://hydra.gnu.org/nar/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk Downloading s8icyy…-python-3.4.3-tk (71KiB installed)... http://hydra.gnu.org/nar/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk 156KiB/s 00:00 | 25KiB transferred Python 3.4.3 (default, Jan 1 1970, 00:00:01) [GCC 4.9.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import readline >>> Error in atexit._run_exitfuncs: FileNotFoundError: [Errno 2] No such file or directory $ guix environment --container --ad-hoc python-2 -- python Python 2.7.10 (default, Jan 1 1970, 00:00:01) [GCC 4.9.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import readline >>> --8<---------------cut here---------------end--------------->8--- Could it be that something in the environment is interfering? Maybe PYTHONPATH pointing to an incompatible readline.so? Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: python readline module 2015-12-20 22:38 ` Ludovic Courtès @ 2015-12-21 9:12 ` Federico Beffa 2015-12-21 10:51 ` Two packages are called ‘python-wrapper’ Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Federico Beffa @ 2015-12-21 9:12 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel On Sun, Dec 20, 2015 at 11:38 PM, Ludovic Courtès <ludo@gnu.org> wrote: > Federico Beffa <beffa@ieee.org> skribis: > >> it appears that our 'python' package, despite having 'readline' among >> its inputs, can't use it: > > It Works for Me: > > --8<---------------cut here---------------start------------->8--- > $ guix environment --container --ad-hoc python -- python3 > substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0% > La jenaj derivoj estos elŝutataj: > /gnu/store/13n8xbi9wv9pigfyhir007qadr81jq46-python-3.4.3 > /gnu/store/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk > > Found valid signature for /gnu/store/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk > From http://hydra.gnu.org/nar/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk > Downloading s8icyy…-python-3.4.3-tk (71KiB installed)... > http://hydra.gnu.org/nar/s8icyyyqb6f82krh95y4kzlgv32vwshb-python-3.4.3-tk 156KiB/s 00:00 | 25KiB transferred > Python 3.4.3 (default, Jan 1 1970, 00:00:01) > [GCC 4.9.3] on linux > Type "help", "copyright", "credits" or "license" for more information. >>>> import readline >>>> > Error in atexit._run_exitfuncs: > FileNotFoundError: [Errno 2] No such file or directory > $ guix environment --container --ad-hoc python-2 -- python > Python 2.7.10 (default, Jan 1 1970, 00:00:01) > [GCC 4.9.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import readline >>>> > --8<---------------cut here---------------end--------------->8--- > > Could it be that something in the environment is interfering? Maybe > PYTHONPATH pointing to an incompatible readline.so? Thanks for checking! The problem appears to be that installing 'python-wrapper' brings in 'python-minimal' instead of 'python': $ guix environment --pure --ad-hoc python-wrapper -- python guix environment: warning: ambiguous package specification `python-wrapper' guix environment: warning: choosing python-wrapper-3.4.3 from gnu/packages/python.scm:312:2 Python 3.4.3 (default, Jan 1 1970, 00:00:01) [GCC 4.9.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/gnu/store/0rjhns4h747zxx4ya85bbnkjw6dz617m-python-minimal-3.4.3/lib/python3.4/site-packages', '/gnu/store/0rjhns4h747zxx4ya85bbnkjw6dz617m-python-minimal-3.4.3/lib/python34.zip', '/gnu/store/0rjhns4h747zxx4ya85bbnkjw6dz617m-python-minimal-3.4.3/lib/python3.4', '/gnu/store/0rjhns4h747zxx4ya85bbnkjw6dz617m-python-minimal-3.4.3/lib/python3.4/plat-linux', '/gnu/store/0rjhns4h747zxx4ya85bbnkjw6dz617m-python-minimal-3.4.3/lib/python3.4/lib-dynload'] >>> import readline Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'readline' >>> Regards, Fede ^ permalink raw reply [flat|nested] 6+ messages in thread
* Two packages are called ‘python-wrapper’ 2015-12-21 9:12 ` Federico Beffa @ 2015-12-21 10:51 ` Ludovic Courtès 2015-12-21 11:09 ` Federico Beffa 0 siblings, 1 reply; 6+ messages in thread From: Ludovic Courtès @ 2015-12-21 10:51 UTC (permalink / raw) To: Federico Beffa; +Cc: Guix-devel [-- Attachment #1: Type: text/plain, Size: 511 bytes --] Federico Beffa <beffa@ieee.org> skribis: > The problem appears to be that installing 'python-wrapper' brings > in 'python-minimal' instead of 'python': > > $ guix environment --pure --ad-hoc python-wrapper -- python > guix environment: warning: ambiguous package specification `python-wrapper' > guix environment: warning: choosing python-wrapper-3.4.3 from > gnu/packages/python.scm:312:2 Indeed, we have two packages called “python-wrapper”, a mistake from 95288fc. This is fixed with: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 536 bytes --] diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 95c24a6..e81e251 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -308,7 +308,9 @@ data types.") (inputs `(("openssl" ,openssl) ("zlib" ,zlib))))) -(define* (wrap-python3 python #:optional (name "python-wrapper")) +(define* (wrap-python3 python + #:optional + (name (string-append (package-name python) "-wrapper"))) (package (inherit python) (name name) (source #f) [-- Attachment #3: Type: text/plain, Size: 312 bytes --] However, this entails a big rebuild, so this will have to go to ‘core-updates’. In the meantime, I would recommend using -e to unambiguously refer to the right wrapper. Otherwise, we could come up with workarounds, such as keeping the ‘python-minimal-wrapper’ private. Thoughts? Ludo’. ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Two packages are called ‘python-wrapper’ 2015-12-21 10:51 ` Two packages are called ‘python-wrapper’ Ludovic Courtès @ 2015-12-21 11:09 ` Federico Beffa 2015-12-21 13:28 ` Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Federico Beffa @ 2015-12-21 11:09 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel On Mon, Dec 21, 2015 at 11:51 AM, Ludovic Courtès <ludo@gnu.org> wrote: > In the meantime, I would recommend using -e to unambiguously refer to > the right wrapper. Otherwise, we could come up with workarounds, such > as keeping the ‘python-minimal-wrapper’ private. Isn't 'python-minimal' just for bootstrapping? If that's the case, I would keep it private (but fix the name anyway). Regards, Fede ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Two packages are called ‘python-wrapper’ 2015-12-21 11:09 ` Federico Beffa @ 2015-12-21 13:28 ` Ludovic Courtès 0 siblings, 0 replies; 6+ messages in thread From: Ludovic Courtès @ 2015-12-21 13:28 UTC (permalink / raw) To: Federico Beffa; +Cc: Guix-devel Federico Beffa <beffa@ieee.org> skribis: > On Mon, Dec 21, 2015 at 11:51 AM, Ludovic Courtès <ludo@gnu.org> wrote: >> In the meantime, I would recommend using -e to unambiguously refer to >> the right wrapper. Otherwise, we could come up with workarounds, such >> as keeping the ‘python-minimal-wrapper’ private. > > Isn't 'python-minimal' just for bootstrapping? If that's the case, I > would keep it private (but fix the name anyway). The problem is that it’s used in other modules. So if we make it private, we’ll have to use (@@ (gnu packages python) python-minimal-wrapper) there. Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-21 13:28 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-20 17:22 python readline module Federico Beffa 2015-12-20 22:38 ` Ludovic Courtès 2015-12-21 9:12 ` Federico Beffa 2015-12-21 10:51 ` Two packages are called ‘python-wrapper’ Ludovic Courtès 2015-12-21 11:09 ` Federico Beffa 2015-12-21 13:28 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).