From: Jelle Licht <jlicht@fsfe.org>
To: znavko@disroot.org, help-guix <help-guix@gnu.org>
Subject: Re: How to use pip3 libs abcent in guix repo?
Date: Thu, 18 Feb 2021 16:45:15 +0100 [thread overview]
Message-ID: <86v9ap5qic.fsf@fsfe.org> (raw)
In-Reply-To: <fd87ef6d62235620933b951609c2f036@disroot.org>
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
next prev parent reply other threads:[~2021-02-18 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2021-02-18 16:22 ` Vincent Legoll
2021-02-18 16:34 ` Jelle Licht
2021-02-18 18:09 ` znavko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86v9ap5qic.fsf@fsfe.org \
--to=jlicht@fsfe.org \
--cc=help-guix@gnu.org \
--cc=znavko@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).