Re: How should learning to program in Python be approached, if learning objectives are sought to be customised?

2021-08-31 Thread Pokoradi Balazs

Hello Rajib,

that's alright) Yes, PyCharm can be installed on Debian:

https://www.jetbrains.com/pycharm/download/#section=linux

Good luck!

On 30/08/2021 16:06, Susmita/Rajib wrote:

Thank you, Mr. Pokoradi, for your informative reply.

I use either Knoppix or Debian. So everything is pre-installed.

I don't know about pydev in Eclipse. So thank you for this bit of
information. I am not sure if PyChem could be installed in my system.
In Debian. So please advise,

I am not a book person. I say they talk a lot and deliver very little.
Tire me. I would rather like tough programs than beginners' programs
that provide insights, while running on the system.

Is there something similar to GDB (or DDD)?

Thank you for your reply.

Best.
Rajib





Re: How should learning to program in Python be approached, if learning objectives are sought to be customised?

2021-08-27 Thread {Pokoradi, Balazs}
Hi Rajib,

I’d recommend “Python crash course” by Eric Mathes, if you like learning using 
books. Gives good explanation of the basics, lists a few sample projects, all 
code is available on GitHub.
I find the best beginner friendly tutorials on particular tasks/packages are 
the ones by Corey Schafer on YouTube.

Eclipse actually has a very good extension for Python called Pydev, so you 
might try that once you’re familiar with the interface, however PyCharm is a 
great choice too.

One personal recommendation is that before starting pip installing Python 
packages on your machine directly, go through virtual environments and start 
using them, it will save you from a lot of issues should you need to use 
different versions of a package or even Python (eg 2.7 vs 3.8).

I hope you find this helpful and the best of luck with your Python journey!

Balazs

Отправлено с iPhone

> 27 авг. 2021 г., в 5:49, Susmita/Rajib  написал(а):
> 
> My dear Illustrious List Maintainers, Programmers and Senior members,
> 
> I have been on and off my idea to self-learn Python programming.
> 
> I learnt a little bit of Java programming, aided by the Eclipse IDE
> and Oracle Java repository, which has exhaustive example codes and
> object library resources, references, explanations, et al.
> 
> To me Python appeared to lack these resources.
> 
> Of late, I have been browsing the website, askpython.com, which said
> that the same facility is available in Python too. The page,
> https://www.askpython.com/python-programming,  in particular says
> about an IDE: "...  PyCharm from JetBrains is the most popular Python
> IDE. It has a Community Edition, which is free and open source ..."
> 
> I recently modified a "word frequency counting for a text file" script
> to have the output redirected on to another text file rather than
> printing the result on the console, and I must say that the
> programming is very simple and elegant.
> 
> So now that I am enthused, could I please be given a little more
> guidance on the following aspects please?:
> (1)   exhaustive example codes
> (2)   object library resources, references, explanations, et al
> (3)   PyCharm from JetBrains
> and any information that is thought relevant.
> 
> My regards and best wishes.
> Rajib Bandopadhyay
> An Open Source enthusiast
> 



Re: How to install older python version on Debian

2021-03-26 Thread {Pokoradi, Balazs}
Hello,

I’d suggest you build it from source (python.org/ftp... with the needed 
version) as an additional python version, and then create your venv using the 
3.6.

You can dm me if you might need more details.

Best regards,
Balazs

Отправлено с iPhone

> 26 марта 2021 г., в 7:14, Andrey Rahmatullin  написал(а):
> 
>> On Fri, Mar 26, 2021 at 09:55:03AM +0800, Robbi Nespu wrote:
>> Dear Debian Python,
>> 
>> I would like to install older python (version 3.6) on my venv environment
>> 
>> $ inxi -S
>> System:Host: debian Kernel: 5.10.0-4-amd64 x86_64 bits: 64 Desktop: KDE
>> Plasma 5.20.5
>>   Distro: Debian GNU/Linux bullseye/sid
>> 
>> (venv)$ python --version
>> Python 3.9.2
>> 
>> on fedora I can easily do something like this[1],
> This only works as long as the version you need is in the repo. It's
> expected that a 2019 distro with 3.7 as the default may also include 3.6,
> which is somewhat different from what you expect here.
> 
>> If my guest are right. Could you suggest me a solution how to have multiple
>> python version so I can load inside venv?
> Build it manually and install it somewhere in your user directory or use
> pyenv.
> 
> -- 
> WBR, wRAR



Re: Need a Python 3.8 virtual environment

2021-03-02 Thread Pokoradi Balazs

Hi Steven,

i tested in a freshly installed virtualbox machine and was able to 
create a virtual environment, using the following steps:


built python3.8.7 form tarball 
(|https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tar.xz)|


ran python3.8 -m venv test387

and then could activate it.

I hope this helps,

Balazs

On 03/03/2021 03:17, Steven Robbins wrote:

Hi,

I'm trying to use a (non-Debian) python system built on python 3.8.  Debian's
default is currently 3.9 so I am advised to use a virtual environment.   Being
a newbie, I searched around and found a writeup covering several different
virtualization tools [1].   Note I am using Debian 'sid'.

I can use the tool "virtualenv" to create a virtual environment for default
python:

steve@riemann:/tmp$ virtualenv blah
created virtual environment CPython3.9.1.final.0-64 in 77ms
   creator CPython3Posix(dest=/tmp/blah, clear=False, no_vcs_ignore=False,
global=False)
   seeder FromAppData(download=False, pip=bundle, setuptools=bundle,
wheel=bundle, via=copy, app_data_dir=/home/steve/.local/share/virtualenv)
 added seed packages: pip==20.1.1, pkg_resources==0.0.0,
setuptools==44.0.0, wheel==0.34.2
   activators
BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator


But not for python 3.8:

steve@riemann:/tmp$ virtualenv -p python3.8 blah38
RuntimeError: failed to find interpreter for Builtin discover of
python_spec='python3.8'


I have installed literally all the Debian python packages whose name contains
'python3.8'.   A very short list:

ii  libpython3.8:amd643.8.7-1
amd64Shared Python runtime library (version 3.8)
ii  libpython3.8-dev:amd643.8.7-1
amd64Header files and a static library for Python (v3.8)
ii  libpython3.8-minimal:amd643.8.7-1
amd64Minimal subset of the Python language (version 3.8)
ii  libpython3.8-stdlib:amd64 3.8.7-1
amd64Interactive high-level object-oriented language (standard
library, version 3.8)
ii  python3.8 3.8.7-1
amd64Interactive high-level object-oriented language (version 3.8)
ii  python3.8-dev 3.8.7-1
amd64Header files and a static library for Python (v3.8)
ii  python3.8-minimal



I have also tried the module 'venv':

steve@riemann:/tmp$ python3.8 -m venv v38
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

 apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/tmp/v38/bin/python3.8', '-Im', 'ensurepip', '--upgrade',
'--default-pip']

steve@riemann:/tmp$ python3.8 -m venv blah38
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

 apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/tmp/blah38/bin/python3.8', '-Im', 'ensurepip', '--
upgrade', '--default-pip']


Note that I do have 'python3-venv' installed, but it is the 3.9 version:
ii  python3-venv  3.9.1-1
amd64pyvenv-3 binary for python3 (default python3 version)


Is there something I've missed?

Thank you,
-Steve

[1] 
https://linuxconfig.org/how-to-set-up-a-python-virtual-environment-on-debian-10-buster