PYTHONPATH vs Python Virtual Environment

2022-02-04 Thread Sina Mobasheri
it's not good title defiantly and I don't mean to compare apples and oranges

when I start using python virtual environment it was because isolation proposes 
and everyone say about its benefits in isolation and working with different 
versions of the same package in different projects

but recently I start using pip install --target  for 
zipapp
 things, and then I use this pip's option (--target) and add its target folder 
to PYTHONPATH and target folder's bin directory to PATH, so it's like virtual 
environment to me

I'm curious what is a problem with this approach (edges), what are other 
benefits of the virtual environment that this way can't offer? most tutorials 
talk about isolation and managing of packages versions but I think maybe it's 
more than that maybe?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: About Python Compressed Archive or Binaries

2022-01-18 Thread Sina Mobasheri
Thanks I really appreciate that, its time consuming task and take lots of hard 
work for sure, I was thinking it's technical issue for python that there isn't 
binary format for it, so I'm happy to hear that we will have that option in the 
future πŸ™πŸ»πŸš€

From: Python-list  on 
behalf of Christian Heimes 
Sent: Tuesday, January 18, 2022, 18:29
To: python-list@python.org
Subject: Re: About Python Compressed Archive or Binaries

On 17/01/2022 18.49, Kirill Ratkin wrote:
> It would be nice to have just zip file with python interpreter (not
> executable installer), unpack it anywhere, add path  to this 'anywhere'
> to PATH, and use it.
>
> Java/DotNet/Go have this option. But python - not.
>
> And question is - why?

Java is developed by Oracle (revenue 49 billion USD)
.NET is developed by Microsoft (revenue 161 billion USD)
Go is developed by Google (revenue of parent company is 182 billion USD)
Python is developed by a bunch of (mostly unpoaid) volunteers under the
umbrella of the PSF (revenue 3.1 million USD).

Do you see a pattern? :)

A distributable binary format for CPython is high on our list. Brett
Cannon, Nathaniel Smith, and I have been discussion a proposal recently.
I landed a bunch of changes in 3.11-dev that are both useful for binary
distribution and for Web Assembly builds. Because all work is done in
our free time, there is only little progress.

Christian
--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Why There Is No Python Compressed Archive or Binaries ?

2022-01-17 Thread Sina Mobasheri
Yes​ sure, actually I can continue working and developing with python without 
this feature no problem but it's something that I like and I'm just curious 
about it, about why Python doesn't implement this kind of installation (most 
languages do, Java, NodeJS, Deno, PHP, Go, DotNet) is it because some 
limitations (technically or politically) or maybe in future they would do 
that... ?


From: Python-list  on 
behalf of Antoon Pardon 
Sent: Monday, January 17, 2022, 23:51
To: python-list@python.org
Subject: Re: Why There Is No Python Compressed Archive or Binaries ?

You could try miniconda.

Op 17/01/2022 om 20:53 schreef Sina Mobasheri:
> Consider scenario that I want run python 3.10 in CentOS 8, I think last 
> python version in CentOS repository is 3.6, if I use epel I can get 3.8 so 
> ..., I think (correct me if I'm wrong πŸ™πŸ») the only way that I can run python 
> 3.10 is to compile it manually, which is need to know what dependencies 
> python needs for compilation ... (different distribution different packages, 
> which packages for what, you can see that it is intimidating for beginners 
> like me)
> It's useful to just use wget  tar.xz>, unzipped, ser path and ta-da you have cpython 3.10 in CentOS 8
>
> This is Linux specific use case that I can think of, I'm sure there are 
> plenty for windows, consider scenario that I wrote script for scraping some 
> site and entered in some excel worksheet I can simply ship cpython with my 
> script to clients machine and there is no need that client install cpython by 
> himself...
>
> Sorry about my bad grammar
> ____
> From: Calvin Spealman 
> Sent: Monday, January 17, 2022, 22:53
> To: Sina Mobasheri
> Cc: python-list@python.org
> Subject: Re: Why There Is No Python Compressed Archive or Binaries ?
>
> Well, on its own, I'd say the reason we don't have such a download is that it 
> wouldn't be very useful.
>
> On Mon, Jan 17, 2022 at 2:08 PM Sina Mobasheri 
> mailto:sinamobash...@outlook.com>> wrote:
> It's cool project definitely something that I'm personally interested about, 
> but I talking about compressed archive of cpython that we can simply unzipped 
> and starting developing an app, not running  an app that already developed... 
> πŸ˜€
> 
> From: Calvin Spealman mailto:cspea...@redhat.com>>
> Sent: Monday, January 17, 2022 10:19:13 PM
> To: Sina Mobasheri 
> mailto:sinamobash...@outlook.com>>
> Cc: python-list@python.org<mailto:python-list@python.org> 
> mailto:python-list@python.org>>
> Subject: Re: Why There Is No Python Compressed Archive or Binaries ?
>
> I maintain a small project that provides this, a drop-in Python runtime you 
> can ship without installation called Feet. Get it? It makes Python run.
>
> https://github.com/ironfroggy/feet
>
> On Mon, Jan 17, 2022 at 11:16 AM Sina Mobasheri 
> mailto:sinamobash...@outlook.com>> wrote:
> Java offers download JDK as Compressed 
> Archive<https://www.oracle.com/java/technologies/downloads/#jdk17-linux> or 
> NodeJS offers download Node as 
> Binaries<https://nodejs.org/en/download/current/> both give us a compressed 
> file for Linux and windows that we can just unzipped it and put in a custom 
> directory and set some environment variables and start working
>
> I'm aware that Python also have something called Embedded 
> Zip<https://www.python.org/ftp/python/3.10.1/python-3.10.1-embed-amd64.zip> 
> for Windows and nothing like that for Linux as far as I know, and I think 
> this Embedded Zip is not something that user wants to work with that directly 
> it's for embedding in a C++ application, so it's not the same as options that 
> Java and NodeJS offers
>
> My question is why Python hasn't option for downloading as Compressed Archive 
> ?
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>
>
> --
>
> CALVIN SPEALMAN
>
> SENIOR QUALITY ENGINEER
>
> calvin.speal...@redhat.com<mailto:calvin.speal...@redhat.com>  M: 
> +1.336.210.5107
>
> [https://red.ht/sig]<https://red.ht/sig>
> TRIED. TESTED. TRUSTED.<https://redhat.com/trusted>
>
>
> --
>
> CALVIN SPEALMAN
>
> SENIOR QUALITY ENGINEER
>
> calvin.speal...@redhat.com<mailto:calvin.speal...@redhat.com>  M: 
> +1.336.210.5107
>
> [https://red.ht/sig]<https://red.ht/sig>
> TRIED. TESTED. TRUSTED.<https://redhat.com/trusted>
>

--
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Why There Is No Python Compressed Archive or Binaries ?

2022-01-17 Thread Sina Mobasheri
Consider scenario that I want run python 3.10 in CentOS 8, I think last python 
version in CentOS repository is 3.6, if I use epel I can get 3.8 so ..., I 
think (correct me if I'm wrong πŸ™πŸ») the only way that I can run python 3.10 is 
to compile it manually, which is need to know what dependencies python needs 
for compilation ... (different distribution different packages, which packages 
for what, you can see that it is intimidating for beginners like me)
It's useful to just use wget , 
unzipped, ser path and ta-da you have cpython 3.10 in CentOS 8

This is Linux specific use case that I can think of, I'm sure there are plenty 
for windows, consider scenario that I wrote script for scraping some site and 
entered in some excel worksheet I can simply ship cpython with my script to 
clients machine and there is no need that client install cpython by himself...

Sorry about my bad grammar

From: Calvin Spealman 
Sent: Monday, January 17, 2022, 22:53
To: Sina Mobasheri
Cc: python-list@python.org
Subject: Re: Why There Is No Python Compressed Archive or Binaries ?

Well, on its own, I'd say the reason we don't have such a download is that it 
wouldn't be very useful.

On Mon, Jan 17, 2022 at 2:08 PM Sina Mobasheri 
mailto:sinamobash...@outlook.com>> wrote:
It's cool project definitely something that I'm personally interested about, 
but I talking about compressed archive of cpython that we can simply unzipped 
and starting developing an app, not running  an app that already developed... πŸ˜€

From: Calvin Spealman mailto:cspea...@redhat.com>>
Sent: Monday, January 17, 2022 10:19:13 PM
To: Sina Mobasheri mailto:sinamobash...@outlook.com>>
Cc: python-list@python.org<mailto:python-list@python.org> 
mailto:python-list@python.org>>
Subject: Re: Why There Is No Python Compressed Archive or Binaries ?

I maintain a small project that provides this, a drop-in Python runtime you can 
ship without installation called Feet. Get it? It makes Python run.

https://github.com/ironfroggy/feet

On Mon, Jan 17, 2022 at 11:16 AM Sina Mobasheri 
mailto:sinamobash...@outlook.com>> wrote:
Java offers download JDK as Compressed 
Archive<https://www.oracle.com/java/technologies/downloads/#jdk17-linux> or 
NodeJS offers download Node as 
Binaries<https://nodejs.org/en/download/current/> both give us a compressed 
file for Linux and windows that we can just unzipped it and put in a custom 
directory and set some environment variables and start working

I'm aware that Python also have something called Embedded 
Zip<https://www.python.org/ftp/python/3.10.1/python-3.10.1-embed-amd64.zip> for 
Windows and nothing like that for Linux as far as I know, and I think this 
Embedded Zip is not something that user wants to work with that directly it's 
for embedding in a C++ application, so it's not the same as options that Java 
and NodeJS offers

My question is why Python hasn't option for downloading as Compressed Archive ?
--
https://mail.python.org/mailman/listinfo/python-list



--

CALVIN SPEALMAN

SENIOR QUALITY ENGINEER

calvin.speal...@redhat.com<mailto:calvin.speal...@redhat.com>  M: 
+1.336.210.5107

[https://red.ht/sig]<https://red.ht/sig>
TRIED. TESTED. TRUSTED.<https://redhat.com/trusted>


--

CALVIN SPEALMAN

SENIOR QUALITY ENGINEER

calvin.speal...@redhat.com<mailto:calvin.speal...@redhat.com>  M: 
+1.336.210.5107

[https://red.ht/sig]<https://red.ht/sig>
TRIED. TESTED. TRUSTED.<https://redhat.com/trusted>

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: About Python Compressed Archive or Binaries

2022-01-17 Thread Sina Mobasheri
That's exactly what I mean thank you πŸ‘ŒπŸ»πŸš€

From: Python-list  on 
behalf of Kirill Ratkin 
Sent: Monday, January 17, 2022 9:19:44 PM
To: python-list@python.org 
Subject: Re: About Python Compressed Archive or Binaries

Hi,

Yes, this is good question for Windows users.

Of course, you can download installer exe-file -> do installation ->
pack directory with python interpreter to zip (for example, or 7z) ->
copy archive file to another place/computer and unpack.

But it will not work out of box because original installer modifies
resources in MZ file and path to stdlib is there.

So just to use interpreter from that archive file you need to open
python.exe file and fix it (in any binary/hex editor).

This simple procedure but ... anyway ... I agree with Sina.

It would be nice to have just zip file with python interpreter (not
executable installer), unpack it anywhere, add path  to this 'anywhere'
to PATH, and use it.

Java/DotNet/Go have this option. But python - not.

And question is - why?


On 1/17/22 18:37, Sina Mobasheri wrote:
> Java offers download JDK as Compressed Archive or NodeJS offers download Node 
> as Binaries both give us a compressed file for Linux and windows that we can 
> just unzipped it and put in a custom directory and set some environment 
> variables and start working
>
>
> I'm aware that Python also have something called Embedded Zip for Windows and 
> nothing like that for Linux as far as I know, and I think this Embedded Zip 
> is not something that the user wants to work with that directly it's for 
> embedding in a C++ application, so it's not the same as options that Java and 
> NodeJS offering
>
>
> My question is why is Python haven't an option for downloading as Compressed 
> Archive?
> Is it's due to a technical issue? political reasons? or is it just simply 
> because nobody has thought of doing it?
>
--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Why There Is No Python Compressed Archive or Binaries ?

2022-01-17 Thread Sina Mobasheri
It's cool project definitely something that I'm personally interested about, 
but I talking about compressed archive of cpython that we can simply unzipped 
and starting developing an app, not running  an app that already developed... πŸ˜€

From: Calvin Spealman 
Sent: Monday, January 17, 2022 10:19:13 PM
To: Sina Mobasheri 
Cc: python-list@python.org 
Subject: Re: Why There Is No Python Compressed Archive or Binaries ?

I maintain a small project that provides this, a drop-in Python runtime you can 
ship without installation called Feet. Get it? It makes Python run.

https://github.com/ironfroggy/feet

On Mon, Jan 17, 2022 at 11:16 AM Sina Mobasheri 
mailto:sinamobash...@outlook.com>> wrote:
Java offers download JDK as Compressed 
Archive<https://www.oracle.com/java/technologies/downloads/#jdk17-linux> or 
NodeJS offers download Node as 
Binaries<https://nodejs.org/en/download/current/> both give us a compressed 
file for Linux and windows that we can just unzipped it and put in a custom 
directory and set some environment variables and start working

I'm aware that Python also have something called Embedded 
Zip<https://www.python.org/ftp/python/3.10.1/python-3.10.1-embed-amd64.zip> for 
Windows and nothing like that for Linux as far as I know, and I think this 
Embedded Zip is not something that user wants to work with that directly it's 
for embedding in a C++ application, so it's not the same as options that Java 
and NodeJS offers

My question is why Python hasn't option for downloading as Compressed Archive ?
--
https://mail.python.org/mailman/listinfo/python-list



--

CALVIN SPEALMAN

SENIOR QUALITY ENGINEER

calvin.speal...@redhat.com<mailto:calvin.speal...@redhat.com>  M: 
+1.336.210.5107

[https://red.ht/sig]<https://red.ht/sig>
TRIED. TESTED. TRUSTED.<https://redhat.com/trusted>
-- 
https://mail.python.org/mailman/listinfo/python-list


Why There Is No Python Compressed Archive or Binaries ?

2022-01-17 Thread Sina Mobasheri
Java offers download JDK as Compressed 
Archive or 
NodeJS offers download Node as 
Binaries both give us a compressed 
file for Linux and windows that we can just unzipped it and put in a custom 
directory and set some environment variables and start working

I'm aware that Python also have something called Embedded 
Zip for 
Windows and nothing like that for Linux as far as I know, and I think this 
Embedded Zip is not something that user wants to work with that directly it's 
for embedding in a C++ application, so it's not the same as options that Java 
and NodeJS offers

My question is why Python hasn't option for downloading as Compressed Archive ?
-- 
https://mail.python.org/mailman/listinfo/python-list


About Python Compressed Archive or Binaries

2022-01-17 Thread Sina Mobasheri
Java offers download JDK as Compressed Archive or NodeJS offers download Node 
as Binaries both give us a compressed file for Linux and windows that we can 
just unzipped it and put in a custom directory and set some environment 
variables and start working


I'm aware that Python also have something called Embedded Zip for Windows and 
nothing like that for Linux as far as I know, and I think this Embedded Zip is 
not something that the user wants to work with that directly it's for embedding 
in a C++ application, so it's not the same as options that Java and NodeJS 
offering


My question is why is Python haven't an option for downloading as Compressed 
Archive?
Is it's due to a technical issue? political reasons? or is it just simply 
because nobody has thought of doing it?

-- 
https://mail.python.org/mailman/listinfo/python-list