Giter Site home page Giter Site logo

Conda environment about kcc HOT 11 CLOSED

jaroslawjanas avatar jaroslawjanas commented on August 11, 2024
Conda environment

from kcc.

Comments (11)

jaroslawjanas avatar jaroslawjanas commented on August 11, 2024 1

@jaroslawjanas

Have you tried python=3.11 ?

Can we adapt the file?

Oh yeah. I've been on 3.11 for a week now. No issues.
It's a matter of changing python=3.8 to python=3.11
I can make a PR for it if we are all in agreement.

from kcc.

darodi avatar darodi commented on August 11, 2024 1

from kcc.

darodi avatar darodi commented on August 11, 2024

Hello @jaroslawjanas

We already have binaries, docker, flatpak/appImage and pip requirements/venv.
I don't really see the point, but why not.
You should maybe add 7zip. For kindlegen, it will be harder I think 😉

from kcc.

axu2 avatar axu2 commented on August 11, 2024

As an aside, Python 3.11 really speeds things up.

The Faster CPython Project is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See Faster CPython for details.

https://www.python.org/downloads/release/python-3110/

from kcc.

jaroslawjanas avatar jaroslawjanas commented on August 11, 2024

@axu2
So we should really go with 3.11 for the default Python version?
We could just remove python= completely and let it install the latest but I think that's considered bad practice by the Anaconda community since it doesn't ensure reproducibility and compatibility.
I think 3.11.* is reasonable. It works for me so I see no issue. But the PR #520 is merged so it might require another one to bump the version. I can make one but I want to make sure we reach some consensus here so that we don't end up with a ton of PRs.

from kcc.

darodi avatar darodi commented on August 11, 2024

What is the best practice with conda to manage other dependencies?
For example qt5, 7zip, ...
Do you need an environment.yml for each platform ? (windows, linux, macOs)

from kcc.

jaroslawjanas avatar jaroslawjanas commented on August 11, 2024

What is the best practice with conda to manage other dependencies? For example qt5, 7zip, ... Do you need an environment.yml for each platform? (windows, linux, macOs)

I think the best way to think about Anaconda (conda for short) is as an extension of pip.

And yes there do seem to be some ports of 7zip in conda-forge which is the channel for community-maintained packages.
But it's not something I'd rely on. There is no documentation and not sure what the maintenance is like. I am also not sure how it would integrate into kcc. I am also not sure if we should consider 7zip as a Python dependency.

As for qt5, there is already PyQt5>=5.6.0 in environment.yml if that's what you mean?

We don't need an environment.yml for each platform, the same as we don't need requirements.txt for each platform.
Where I see environment.yml to be the most useful is in a Windows environment, where Anaconda is used 99% of the time. It makes the setup more straightforward. Could be probably added to wiki in the future.

I don't think we need any of the non-python dependencies on Windows (with the exception of 7zip maybe?).
At least I didn't run into any issues so far.

Linux users are likely to use virtualenv together with pip install -r requirements.txt, though conda should work just as well.

from kcc.

axu2 avatar axu2 commented on August 11, 2024

We use Python 3.11 in docker for KCC so...

from kcc.

darodi avatar darodi commented on August 11, 2024

I'm not a conda user, but from what I've read:

https://scribe.esmailelbob.xyz/analytics-vidhya/understand-conda-and-pip-9e5c67da47cc

Difference b/w Conda and Pip
Pip installs Python packages whereas conda installs packages which may contain software written in any language.

If you are using conda without external dependencies other than python packages,
I must admit I don't really understand and see the point "conda vs pyenv/pip/venv".

https://imgs.xkcd.com/comics/standards.png 😁

from kcc.

jaroslawjanas avatar jaroslawjanas commented on August 11, 2024

I'm not a conda user, but from what I've read:

https://scribe.esmailelbob.xyz/analytics-vidhya/understand-conda-and-pip-9e5c67da47cc

Difference b/w Conda and Pip
Pip installs Python packages whereas conda installs packages which may contain software written in any language.

If you are using conda without external dependencies other than python packages, I must admit I don't really understand and see the point "conda vs pyenv/pip/venv".

https://imgs.xkcd.com/comics/standards.png 😁

What they mean by "[...] install packages which may contain software written in any languages" is that they are packages that are actually compiled binaries that are then used by Python.

Anaconda downloads .conda files which I think are containers with all the information necessary for a particular package to work properly. I actually don't know the inner workings of those files, but there is some good info here.

In other words "Anaconda provides its own distribution of packages [...]. The packages in Anaconda are pre-compiled and optimized for various platforms, making installation easier and potentially faster."
Though obviously, depending on the specific package you might get little to no improvement.
How significant is this? I don't know. I'd actually have to do proper testing to see if there is any actual improvement in this specific scenario.

As to address "conda vs pyenv/pip/venv". Anaconda is the most popular Python environment manager on Windows so it'd be nice to facilitate that anyway? Makes for a single command setup which might be more convenient for some. Though you can still do it with requirements.txt but it requires an extra command, but then you don't end up with conda packages and miss out on any of the potential optimisations I mentioned above.

Oh, and we get to dictate the default Python version which seems to be a good thing seeing there is performance to be gained there.

I am not a know-it-all so if someone knows something I don't then I am all ears. Python did change a fair bit these past few years so maybe what I wrote above has changed.

from kcc.

darodi avatar darodi commented on August 11, 2024

@jaroslawjanas

Have you tried
python=3.11
?

Can we adapt the file?

from kcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.