unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to use pip3 libs abcent in guix repo?
@ 2021-02-17 20:42 znavko--- via
  2021-02-18 15:08 ` Hartmut Goebel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: znavko--- via @ 2021-02-17 20:42 UTC (permalink / raw)
  To: help-guix

Hello, developers and users!
I wish to use python-binance, ta-lib, python-websocket-client, python-numpy as in this video https://youtu.be/GdlFhF6gjKo?t=713 (https://youtu.be/GdlFhF6gjKo?t=713)
Guix repository already has python-numpy, python-websocket-client packages, but others abcent.

How can I use python libs downloading them from web without installation by guix pm?
Is there proper way to setup python libraries in my system, where to place it and how to link it?

Thank you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use pip3 libs abcent in guix repo?
  2021-02-17 20:42 How to use pip3 libs abcent in guix repo? znavko--- via
@ 2021-02-18 15:08 ` Hartmut Goebel
  2021-02-18 15:45 ` Jelle Licht
  2021-02-18 18:09 ` znavko
  2 siblings, 0 replies; 6+ messages in thread
From: Hartmut Goebel @ 2021-02-18 15:08 UTC (permalink / raw)
  To: znavko, help-guix

Am 17.02.21 um 21:42 schrieb znavko--- via:
> I wish to use python-binance, ta-lib, python-websocket-client, python-numpy as in this videohttps://youtu.be/GdlFhF6gjKo?t=713  (https://youtu.be/GdlFhF6gjKo?t=713)
> Guix repository already has python-numpy, python-websocket-client packages, but others abcent.

Please be more specific. This video is 1:23 long. Do you really expect 
us to watch this just to learn what you mean?

In guix there is not "pip3" package, since pip is part of Python.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use pip3 libs abcent in guix repo?
  2021-02-17 20:42 How to use pip3 libs abcent in guix repo? znavko--- via
  2021-02-18 15:08 ` Hartmut Goebel
@ 2021-02-18 15:45 ` Jelle Licht
  2021-02-18 16:22   ` Vincent Legoll
  2021-02-18 18:09 ` znavko
  2 siblings, 1 reply; 6+ messages in thread
From: Jelle Licht @ 2021-02-18 15:45 UTC (permalink / raw)
  To: znavko, help-guix

Hey Znavko,

znavko--- via <help-guix@gnu.org> writes:

> Hello, developers and users!
> I wish to use python-binance, ta-lib, python-websocket-client, python-numpy as in this video https://youtu.be/GdlFhF6gjKo?t=713 (https://youtu.be/GdlFhF6gjKo?t=713)
> Guix repository already has python-numpy, python-websocket-client packages, but others abcent.
>
> How can I use python libs downloading them from web without installation by guix pm?
> Is there proper way to setup python libraries in my system, where to place it and how to link it?

As a python 'noob' who started seriously playing around with it about a
week ago, I might save you some hassle:

It is really, really much easier to work with guix-managed dependencies;
check out the guix pypi importer to see how this can work.

If you do not want do that, for whichever reason, I can recommend using
a virtualenv. Open a guix environment by issuing:

`guix environment --ad-hoc python-pip python-virtualenv python-numpy python-websocket-client python'

Note that it is important that the "python" package comes last in this
invocation!

In the spawned shell, run:

--8<---------------cut here---------------start------------->8---
virtualenv -p python3 my-amazing-venv
source my-amazing-venv/bin/activate
pip3 install python-binance
--8<---------------cut here---------------end--------------->8---

After that, but still in your `guix environment' + `source
my-amazing-venv/bin/activate' shell, you should be able to verify that
you can load up binance:
`python3 -m binance'

It won't complain about not finding the binance module, so in this case,
no output = good news.

Because all of this is a kind of terrible user experience, it might make
sense to string all of this stuff together in a shell script. Again, I'd
like to state that simply getting all of the packages you need packaged
for guix (locally or in guix proper) makes all of this complexity go away.

HTH,
 - Jelle


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use pip3 libs abcent in guix repo?
  2021-02-18 15:45 ` Jelle Licht
@ 2021-02-18 16:22   ` Vincent Legoll
  2021-02-18 16:34     ` Jelle Licht
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Legoll @ 2021-02-18 16:22 UTC (permalink / raw)
  To: Jelle Licht; +Cc: help-guix

Hello,

On Thu, Feb 18, 2021 at 4:45 PM Jelle Licht <jlicht@fsfe.org> wrote:
> `guix environment --ad-hoc python-pip python-virtualenv python-numpy python-websocket-client python'
>
> Note that it is important that the "python" package comes last in this
> invocation!

Can you elaborate a bit on why this is required ?

Or maybe I should just RTFM... ;-)

Thanks

-- 
Vincent Legoll


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use pip3 libs abcent in guix repo?
  2021-02-18 16:22   ` Vincent Legoll
@ 2021-02-18 16:34     ` Jelle Licht
  0 siblings, 0 replies; 6+ messages in thread
From: Jelle Licht @ 2021-02-18 16:34 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: help-guix

Vincent Legoll <vincent.legoll@gmail.com> writes:

> Hello,
>
> On Thu, Feb 18, 2021 at 4:45 PM Jelle Licht <jlicht@fsfe.org> wrote:
>> `guix environment --ad-hoc python-pip python-virtualenv python-numpy python-websocket-client python'
>>
>> Note that it is important that the "python" package comes last in this
>> invocation!
>
> Can you elaborate a bit on why this is required ?

Not so much required, but rather a way to work around a bug I ran into:

https://issues.guix.gnu.org/issue/46569

> Or maybe I should just RTFM... ;-)

We all should, but it wouldn't have helped you in this case I think :-)
 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to use pip3 libs abcent in guix repo?
  2021-02-17 20:42 How to use pip3 libs abcent in guix repo? znavko--- via
  2021-02-18 15:08 ` Hartmut Goebel
  2021-02-18 15:45 ` Jelle Licht
@ 2021-02-18 18:09 ` znavko
  2 siblings, 0 replies; 6+ messages in thread
From: znavko @ 2021-02-18 18:09 UTC (permalink / raw)
  To: Jelle Licht, help-guix

Thank you for tricks!


February 18, 2021 3:45 PM, "Jelle Licht" <jlicht@fsfe.org> wrote:

> Hey Znavko,
> 
> znavko--- via <help-guix@gnu.org> writes:
> 
>> Hello, developers and users!
>> I wish to use python-binance, ta-lib, python-websocket-client, python-numpy as in this video
>> https://youtu.be/GdlFhF6gjKo?t=713 (https://youtu.be/GdlFhF6gjKo?t=713)
>> Guix repository already has python-numpy, python-websocket-client packages, but others abcent.
>> 
>> How can I use python libs downloading them from web without installation by guix pm?
>> Is there proper way to setup python libraries in my system, where to place it and how to link it?
> 
> As a python 'noob' who started seriously playing around with it about a
> week ago, I might save you some hassle:
> 
> It is really, really much easier to work with guix-managed dependencies;
> check out the guix pypi importer to see how this can work.
> 
> If you do not want do that, for whichever reason, I can recommend using
> a virtualenv. Open a guix environment by issuing:
> 
> `guix environment --ad-hoc python-pip python-virtualenv python-numpy python-websocket-client
> python'
> 
> Note that it is important that the "python" package comes last in this
> invocation!
> 
> In the spawned shell, run:
> 
> --8<---------------cut here---------------start------------->8---
> virtualenv -p python3 my-amazing-venv
> source my-amazing-venv/bin/activate
> pip3 install python-binance
> --8<---------------cut here---------------end--------------->8---
> 
> After that, but still in your `guix environment' + `source
> my-amazing-venv/bin/activate' shell, you should be able to verify that
> you can load up binance:
> `python3 -m binance'
> 
> It won't complain about not finding the binance module, so in this case,
> no output = good news.
> 
> Because all of this is a kind of terrible user experience, it might make
> sense to string all of this stuff together in a shell script. Again, I'd
> like to state that simply getting all of the packages you need packaged
> for guix (locally or in guix proper) makes all of this complexity go away.
> 
> HTH,
> - Jelle


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-18 18:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 20:42 How to use pip3 libs abcent in guix repo? znavko--- via
2021-02-18 15:08 ` Hartmut Goebel
2021-02-18 15:45 ` Jelle Licht
2021-02-18 16:22   ` Vincent Legoll
2021-02-18 16:34     ` Jelle Licht
2021-02-18 18:09 ` znavko

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).