« first day (2403 days earlier)      last day (815 days later) » 

7:51 AM
@AndrasDeak how can I make a Python venv with vanilla Python? Having anaconda installed, it seems that I can only create venvs with all packages attached. The reason I'd like to do this, is because I use auto-py-to-exe to create executables for my colleagues, but those executables become huge (~1GB) for just a few hundred lines of code that use up to 6 packages, as auto-py-to-exe packages my entire environment, including all packages I don't use
 
8:10 AM
@Adriaan python_you_want -m venv path/to/env
Windows syntax might differ
 
@AndrasDeak and that won't install all packages that come with anaconda* by default?
 
Nope, it will be clean. What you asked for :P
 
python39 -m venv "path" errors out due to python39 not being recognised. What'd I miss? python39\python errors as well
 
8:31 AM
Find an executable path that works
py? Something like that. I don't do windows.
 
`C:\users\me\anaconda3\python39` might work in that case. Eskerrikasko!
 
 
1 hour later…
9:59 AM
So I just did that, but I still can import packages without first installing them to my venv ;v
 
@Adriaan So you're creating venv environments inside a conda environment?
 
Apparently so, which is not what I want
 
it might be what you want though:)
 
As long as I get an environment with only the 4 packages I need installed, it'd be grand. I just don't need regex, matplotlib, babylon and what not packaged into my simple auto-emailer
 
let me try, I have a computer right here with windows
 
10:12 AM
 
as I understand, you didn't arrive at this error?
conda create -n venvtest
conda activate venvtest
conda install numpy  # installs numpy, mkl, libcblas, liblapack, libblas
python -m venv pyvenv
pyvenv\Scripts\activate.bat
python
import numpy # ModuleNotFoundError: No module named 'numpy'
(having executed these commands in the "anaconda prompt")
or can you reproduce this error?
 
@Adriaan did you activate the venv instead of conda?
 
@flawr I get all those errors now
Right, so, if I install my modules in that environment and then package it, it should be smaller, right?
 
Hopefully yes
 
But you need to activate this venv-environment first, and then use pip to install your packages in said environment.
 
10:20 AM
But bundling python like that is always a pain
 
yeah I have no idea what kind of shenanigans autopy-to-exe does.
 
It appears to bundle every single module you have installed into the executable, even if you do not call them in your script
 
that makes sense
but I just tried it, and it only seems to bundle the stuff you have in your venv environment, not the stuff in the conda envionrment, which is exactly what I would have expecte from a somewhat well behaved program:)
(so continuing the example I made above: it will not bundle numpy)
I installed tqdm in my pyvenv (which is a rather light weight package) and write a simple example program, tqdm gets packed correctly and works as expected. The executable is slightly more than 8MB
So that's my 2 Rappen, let me know if you want me to try or test something!
 
Hm. I installed my packages into my venv, I think, get an executable of 10MB, but when I try to run it, it fails with the error that it can't find Numpy
 
but you have installed numpy via pip into your venv-environment?
 
10:35 AM
via conda
 
that doesn't work
 
should I pip install? Right, lets do that then
 
no
 
(I feel like such a noob here0
 
you need to first activate your venv
then install numpy via pip
so the only thing that the conda and the venv environment share is the python interpreter, but none of the packages
 
10:37 AM
ah. Good to know, thanks
 
the conda envionrment is more all-inclusive in that every environment has its own python installation, while the venv-environments use some existing python installations. but if you activate a venv environment, your python (which will be the one from the conda environment) can only see whatever you've installed in your venv environment
 
@flawr and conda contains more than python, it can handle system package dependencies as well
if you're not using that feature conda is a mistake
just download python and use venv
 
I wouldn't say that, I use both! Managing multiple different python installatino without conda is a PITA
furthermore the conda tools for managing (conda) environments are pretty nice, as you for instance have a environment versioning system that automatically tracks the changes you make to your environment
 
It really isn't. Have each python version somewhere, and you only need that path once when you create a venv.
my impression is that conda is too versatile for its own good
see also noobs getting confused :P
 
it has a certain complexity, that is true, but I really wouldn't want to miss it
 
10:47 AM
of course windows is always a bit more tricky because it's often useless for development
I know the scipy stack used to be easier to install through conda, but I heard that's no longer the case
on linux there's really no need to drop conda on noobs (without explicit good reason)
 
So in my experience there are issues (on linux) when you have a built in python installation and another one you installed yourself, and depending on your variables suddenly certain tools stop working because they use a different python installation, or maybe you have a package in a venv that only works with a specify python version etc
with conda you have this nice encapsulation that protects you from stuff like that
or if your python interpreter gets fucked you don't fuck up everythign else depending on that particular interpreter
a drawback of the same is that conda therefore can take up lots of space
but in my opinion for many thing it many advantages over pip and venv
another thing is that if you use pip freeze to make a requirements file, you get all the packages and their versions, but you have no idea what python version was used.
 
@flawr huh?
 
Ok I'll take my missionary hat off now:)
 
Depending on your variables?
 
environment variables
 
10:58 AM
if you use a venv it should Just Work
As I said there can be tricky bits when you have non-python system dependencies.
@flawr that's true but it also won't tell you tomorrow's weather
 
yeah I wrote a pull request for that
I just feel like both tools do have their places, but there are a lot of misconceptions floating around
mostly because many newbies don't RTFM
(but who am I to judge?:)
 
11:16 AM
@Adriaan does it work now?
 
No, I' m fighting windows at the moment
the IT dude that set up my account used a space between my first and last name and a German windows. So Python is going nuts that it has a whitespace in its folder name and all kinds of non-ascii goo with umlauts >.<
So I'm spending today to setup everything anew -.-
 
Python doesn't have any issue with that so there was probably something else wrong
 
conda did complain about spaces (not error mind you, just warned me some packages might have issues) and my venv certainly borked on the whitespace
 
that's sounds really surprising, but I never had windows and spaces in paths
if I recall correctly "Program Files" has a space in it normally, so it's not exactly far-fetched a situation
 
Oh well, I wanted to set up everything anew anyway. I was fed up with a German windows, in which I couldn' t find a thing :P
 
11:34 AM
Couldn't you find any of your DATEI?
 
12:17 PM
yeah thats aweful in windows, especailly the non-english versions where paths get translated for somethings but not for others
 
That's not Windows-specific, that's how localisation usually works. In debian/ubuntu things like Documents and Downloads get translated
 
12:32 PM
But is it as bad as in windows? For example "Program Files" is shown as "Programme" in the breadcrumbs, but the actual path is still "Program Files"
 
OK, that sounds bad
Although the issue might be that you have breadcrumbs in your computer
 
@AndrasDeak don't tell anyone where I store my snacks:P
 
12:47 PM
@AndrasDeak I l always store those in my beard for the way home
 
those birds nesting in there need some food after all
 
At a metal festival I once saw someone who had somehow hidden a bottle opener in his beard. So he walked around sticking beer bottles into his beard to remove the caps
 
lol
Perhaps he had one of these (warning: "lip gauge", apparently, might freak people out) readthetrieb.com/wp-content/uploads/lippentunnel.jpg
 
how do you even drink wth stuff like this
gotta do a handstand??
or put a plug in?
 
has to be a transparent plug in there
otherwise drool just oozes out
 
1:16 PM
well I guess for me the cons outweigh the pros:)
 
Must be a close call :P
 
 
2 hours later…
3:23 PM
@flawr What pros?
The one where people don't want to look at you?
I guess that can be convenient...
 
the pros are clearly asserting dominance by keeping gummy bears in your lower lip
and displaying your gummy bear collection to the world
 
I know someone who'd need a much, much larger lip to fit their whole gummy bear collection. :)
Well, at least in the morning, by the afternoon there usually weren't many left...
 
3:59 PM
hahaha
 

« first day (2403 days earlier)      last day (815 days later) »