Re: Truncation error

2020-10-07 Thread Meghna Karkera
When I use the same code in MATLAB I get the answer as 4.6e-06 and when I
use the same code in PYTHON I get the answer as 4.7e-06. How do I know
which is the most precise and accurate value. Actually the answer is a big
matrix, I've only compared the first entry of the matrix.

On Wed, Oct 7, 2020, 11:24 Marco Sulla  wrote:

> If you want to avoid float problems, you can use Decimal:
>
> https://docs.python.org/3/library/decimal.html
>
> On Wed, 7 Oct 2020 at 05:23, Meghna Karkera  wrote:
> >
> > How is PYTHON better than other software's(MATLAB) in case of truncation
> or
> > rounding off error.
> >
> > Thanks
> > Meghna
> > --
> > https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [poetry] Entry points not converted to scripts

2020-10-07 Thread Marco Sulla
You can also, and this is the preferred way, install it in the venv
and use it in the venv.

When you activate the venv shell, you can `pip install` anything you
want. The packages will be installed inside the venv, and you don't
need any PYTHONUSERBASE or PYTHONPATH. The venv already manages this.

If you think it's easier to have global installed packages (as I
thought), probably you'll change your opinion with some years of
experience.
-- 
https://mail.python.org/mailman/listinfo/python-list


Embedding version in command-line program

2020-10-07 Thread Loris Bennett
Hi,

I have written a program, which I can run on the command-line thus

  mypyprog --version

and the get the version, which is currently derived from a variable in
the main module file.

However, I also have the version in an __init__.py file and in a
pyproject.toml (as I'm using poetry, otherwise this would be in
setup.py).

What's the best way of reducing these three places where the version is
defined to a single one?

Cheers,

Loris

-- 
This signature is currently under construction.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Embedding version in command-line program

2020-10-07 Thread Marco Sulla
In __init__.py, you can parse the toml file, extract the version and
store it in a __version__ variable.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Embedding version in command-line program

2020-10-07 Thread Marco Sulla
On Wed, 7 Oct 2020 at 14:16, Loris Bennett  wrote:
> But the toml file isn't part of the distribution and so it won't be
> installed.
>
> I suppose I could write a separate program which parses the toml file
> and then just injects the version into __init__.py.

Yes, I do not know poetry, but I suppose you can generate it in its
setup. I usually create a separate VERSION file and I read it in
__init__.py. Other people creates a version.py that is evaled inside
__init__.py
-- 
https://mail.python.org/mailman/listinfo/python-list


help with installation

2020-10-07 Thread rebecca kahn
Good morning.
I need to install numpy and matplotlib  for school. But everytime I run the 
comand i get a error on the metadata fase. Can you offer assistance?
Sincerely Rebecca Kahn

Microsoft Windows [Version 10.0.18362.1082]
(c) 2019 Microsoft Corporation. Todos os direitos reservados.

C:\Users\Acer>python -m pip install numpy
Collecting numpy
  Using cached numpy-1.19.2.zip (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
 command: 'C:\Users\Acer\AppData\Local\Programs\Python\Python39\python.exe' 
'C:\Users\Acer\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py'
 prepare_metadata_for_build_wheel 'C:\Users\Acer\AppData\Local\Temp\tmppy7jzjum'
 cwd: C:\Users\Acer\AppData\Local\Temp\pip-install-x6gpr088\numpy
Complete output (200 lines):
Running from numpy source directory.
setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with 
generating Cython sources and expanding templates
  run_build = parse_setuppy_commands()
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
Cythonizing sources
blas_opt_info:
blas_mkl_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying 
from distutils
customize MSVCCompiler
  libraries mkl_rt not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\libs']
  NOT AVAILABLE

blis_info:
  libraries blis not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\libs']
  NOT AVAILABLE

openblas_info:
  libraries openblas not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 
'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
customize GnuFCompiler
Could not locate executable g77
Could not locate executable f77
customize IntelVisualFCompiler
Could not locate executable ifort
Could not locate executable ifl
customize AbsoftFCompiler
Could not locate executable f90
customize CompaqVisualFCompiler
Could not locate executable DF
customize IntelItaniumVisualFCompiler
Could not locate executable efl
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize G95FCompiler
Could not locate executable g95
customize IntelEM64VisualFCompiler
customize IntelEM64TFCompiler
Could not locate executable efort
Could not locate executable efc
customize PGroupFlangCompiler
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries tatlas not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\libs']
  NOT AVAILABLE

atlas_3_10_blas_info:
  libraries satlas not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\libs']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\libs']
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\libs']
  NOT AVAILABLE

accelerate_info:
  NOT AVAILABLE


C:\Users\Acer\AppData\Local\Temp\pip-install-x6gpr088\numpy\numpy\distutils\system_info.py:1914:
 UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
  if self._calc_info(blas):
blas_info:
  libraries blas not found in 
['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 
'C:\\Users\\

Re: [RELEASE] Python 3.9.0 is now available, and you can already test 3.10.0a1!

2020-10-07 Thread Tomas Hrnciar
Hello,

I am getting PGP error with the new Python3.10.0a1.
I would like to ask what key it was signed with and whether it wasn't
Pablo's.
If so, it might be missing in pubkeys.txt.

Thank you.
T.

On Mon, Oct 5, 2020 at 10:48 PM Łukasz Langa  wrote:

> On behalf of the Python development community and the Python 3.9 release
> team, I’m pleased to announce the availability of Python 3.9.0.
>
> Python 3.9.0 is the newest feature release of the Python language, and it
> contains many new features and optimizations. You can find Python 3.9.0
> here:
>
> https://www.python.org/downloads/release/python-390/ <
> https://www.python.org/downloads/release/python-390/>
>
> Most third-party distributors of Python should be making 3.9.0 packages
> available soon.
>
> See the “What’s New in Python 3.9 <
> https://docs.python.org/release/3.9.0/whatsnew/3.9.html>” document for
> more information about features included in the 3.9 series. Detailed
> information about all changes made in 3.9.0 can be found in its change log <
> https://docs.python.org/release/3.9.0/whatsnew/changelog.html#changelog>.
>
> Maintenance releases for the 3.9 series will follow at regular bi-monthly
> intervals starting in late November of 2020.
>
>
>
> OK, boring! Where is Python 4?
>
> Not so fast! The next release after 3.9 will be 3.10. It will be an
> incremental improvement over 3.9, just as 3.9 was over 3.8, and so on.
>
> In fact, our newest Release Manager, Pablo Galindo Salgado, prepared the
> first alpha release of what will become 3.10.0 a year from now. You can
> check it out here:
>
> https://www.python.org/downloads/release/python-3100a1/ <
> https://www.python.org/downloads/release/python-3100a1/>
>
> We hope you enjoy the new releases!
>
> Thanks to all of the many volunteers who help make Python Development and
> these releases possible! Please consider supporting our efforts by
> volunteering yourself or through organization contributions to the Python
> Software Foundation.
>
> https://www.python.org/psf/ 
> More resources
>
> Online Documentation 
> PEP 596 , 3.9 Release Schedule
> PEP 619 , 3.10 Release Schedule
> Report bugs at https://bugs.python.org .
> Help fund Python and its community  >.
> Your friendly release team,
> Ned Deily @nad 
> Steve Dower @steve.dower 
> Pablo Galindo Salgado @pablogsal 
> Łukasz Langa @ambv 
> ___
> Python-announce-list mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-announce-list.python.org/
> Member address: [email protected]
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Reply: Issues in Python Installation

2020-10-07 Thread nichalvedant07
someone please help me out it would be of great help



Sent from vivo smartphone
> Hello,
>
>  
>
> I am an amateur python developer but I’m facing a lot of issues regarding 
> python installation on windows 10...whenever I install python on y 
> pc...irrespective of its version my scripts folder is always empty..so I 
> tried installing pip from the zip file available at pipy.org...pip got 
> installed successfully but when I used it I received an error saying…
>
> OsError [Errno9]: Bad File Descriptor
>
> So, I’m not able to install pip and other modules due to which I’m facing a 
> lot of issues.
>
> I would really appreciate a lot if you can help me out of this.
>
> I have tried out alternatives for python interpreter like anaconda, 
> mimiconda, win python, etc.. But in vain..
>
> I have tried 100s of solutions but still for no good...
>
> Requesting you to please please please help me out of this...
>
> I will be really happy and grateful to you if you could help me out of this...
>
>  
>
> Thanks and Regards,
>
> Vedant Nichal
>
>  
>
> Sent from Mail for Windows 10
>
>  
>
>
> Virus-free. www.avast.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Embedding version in command-line program

2020-10-07 Thread Loris Bennett
Hi Marco,

Marco Sulla  writes:

> In __init__.py, you can parse the toml file, extract the version and
> store it in a __version__ variable.

But the toml file isn't part of the distribution and so it won't be
installed.

I suppose I could write a separate program which parses the toml file
and then just injects the version into __init__.py.

Cheers,

Loris

-- 
This signature is currently under construction.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Truncation error

2020-10-07 Thread Peter Pearson
On Wed, 7 Oct 2020 13:29:26 +0530, Meghna Karkera  wrote:
> On Wed, Oct 7, 2020, 11:24 Marco Sulla  wrote:
>> On Wed, 7 Oct 2020 at 05:23, Meghna Karkera  wrote:
>> >
>> > How is PYTHON better than other software's(MATLAB) in case of
>> > truncation or rounding off error.
>
>> [snip]
>
> When I use the same code in MATLAB I get the answer as 4.6e-06 and when I
> use the same code in PYTHON I get the answer as 4.7e-06. How do I know
> which is the most precise and accurate value. Actually the answer is a big
> matrix, I've only compared the first entry of the matrix.

I hope your big matrix has many elements much larger than 4.7e-06,
so that you don't really have to worry about which package has the
smaller roundoff error.  If you *are* in the situation of having to
worry about roundoff error, that's likely to mean that you have to
plan your entire computation around the goal of minimizing its
susceptibility to tiny amounts of noise, and that's a problem much
more complex than choosing a language.

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list