Python Forum
will using conda fix my frustration?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
will using conda fix my frustration?
#1
Essentially, my question is regarding my misunderstanding of the differences between venv, conda and virtualenv.

I have always used venv for python environments and 'pip install' for any requirements.

A few weeks ago I switched from opensuse leap to tumbleweed (a complete OS reinstall) and getting the pip requirements to install was a nightmare... error after error after error. Eventually, I got them installed and everything is OK. I can't remember what I finally did to get them install.

Today I decided to fire up my code on my Fedora laptop and I'm having the same problems getting my pip requirements to install.

So I'm looking into conda...
Is it possible to create a conda environment for a chosen version of python such that I can upload the whole thing to git and upon git cloning on a different machine for my code to work? I guess I'm asking 'does it bundle up Python and all the requirements that I can take to any machine?

Thank you!
Reply
#2
you should check and see which version of python came with your distro. It may be very old (current is 3.12.4)
python -V
and while at it, make sure pip matches version:
pip -V
You should not have had any problem installing packages.
This is sort of elementary, but to be sure, pip is run from command line
Reply
#3
Thank for your reply. I got it working after installing a load of -devel files... I think the crucial ones were python3-cairo-devel, cairo-gobject-devel but I dunno. Only then would 'pip install pygobject' work.
Reply
#4
Glad to hear.
Reply
#5
So, it's not general problem with pip/PyPI, but problem installing specific package. As always reading the docs always good first step (in addition to checking supported python versions), where it specifically instructs you what to do - install the build dependencies and GTK (e.g. install said devel packages)
https://pygobject.gnome.org/getting_star...o-opensuse

Quote:Installing from PyPI with pip:

Open a terminal and enter your virtual environment

Execute sudo zypper install cairo-devel pkg-config python3-devel gcc gobject-introspection-devel to install the build dependencies and GTK

Execute pip3 install pycairo to build and install Pycairo

Execute pip3 install PyGObject to build and install PyGObject

Change the working directory to where your hello.py script can be found

Run python3 hello.py
Larz60+ likes this post
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Confused over Conda Package manager vs PIP JanOlvegg 3 4,885 Mar-09-2023, 02:09 PM
Last Post: JanOlvegg
  How to deactivate correctly a conda environment NoNameoN 2 5,348 Nov-04-2022, 01:43 PM
Last Post: NoNameoN
  SSL error while trying to update conda ilango 0 2,788 Nov-04-2021, 08:38 AM
Last Post: ilango
  Error: How to to close and restart your shell after running 'conda init' angelica 3 11,808 May-27-2020, 10:00 AM
Last Post: snippsat
  Creating Conda env from requirments.txt file ErnestTBass 7 38,723 Apr-23-2020, 06:57 PM
Last Post: snippsat
  Installing a new package using pip in conda environment firebolt7 1 3,262 Nov-18-2019, 12:31 PM
Last Post: snippsat
  Auto activate conda env in Pycharm terminal ntuttle 0 5,625 Mar-08-2019, 03:56 PM
Last Post: ntuttle
  sys library and how to import using conda michavardy 0 3,179 Feb-26-2019, 08:25 AM
Last Post: michavardy
  .sort frustration Python_for_dummies_needed 2 3,544 Jan-29-2018, 04:45 AM
Last Post: Larz60+
  Installing blpapi in two different conda environments snicolaou 0 4,650 Jan-09-2018, 02:12 PM
Last Post: snicolaou

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020