Getting Python on Windows points USER_HOME

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting Python on Windows points USER_HOME

R Steiger
Having installed the latest Cygwin-built Python distro (3.8.1), it thinks user-site is C:\Users\<myName>\AppData\Roaming ...



For all the usual reasons (and I'm confident like many of y'all) I strongly prefer having user-site = ~, i.e. *nix-style.



I've munged Lib/site.py and sysconfig.py to set base = "~" when os.name == "nt", but this doesn't do the trick.  What am I missing?

Thanks,

-rjs

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Getting Python on Windows points USER_HOME

marco atzeri-4
Am 21.01.2020 um 01:08 schrieb R Steiger:
> Having installed the latest Cygwin-built Python distro (3.8.1), it thinks user-site is C:\Users\<myName>\AppData\Roaming ...
>

How ?
the Python 3.8 available from Cygwin is under

     2019-09-15 19:58     2674707 usr/bin/libpython3.8.dll
     2019-09-15 19:58          78 usr/bin/pydoc3.8
     2019-09-15 19:58        9235 usr/bin/python3.8.exe
     2019-09-15 19:58       47261 usr/include/python3.8/pyconfig.h
     2019-09-15 19:59           0 usr/lib/python3.8/lib-dynload/
     2019-09-15 19:58       46099
usr/lib/python3.8/lib-dynload/array.cpython-38-x86_64-cygwin.dll

see
https://cygwin.com/packages/x86_64/python38/python38-3.8.0-0.5.b4


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

RE: Getting Python on Windows points USER_HOME

R Steiger
Hi Marco,

Thanks for the response.  As you seemed to hint, seems my Python installation was bent: I checked your dir listing against my Cygwin root directory (C:\cygwin64), and found that neither usr/bin nor usr/lib exist (usr/include/python3.8/pyconfig.h does exist).  I've made several attempts to do full reinstalls of python3.8, being careful to first scrape-off all previously-installed python files (including tools, other packages, and those in my Windows USER_HOME and on C:), and have yet to succeed in getting it to install in anything like the configuration you listed, and get a working Python.

Looking at C:\cygwin64\var\log\setup.log.full, there are a few thousand lines of the form "Installing file cygfile:///usr/bin/python3.8.exe" (preceded by about the same number of "unlink" + "rmdir" lines), but no indication of where the files are installed on disk.  The installer asks for no additional parameters, so it doesn't seem that I'm failing to provide some required bit of info.

I have the following Qs:

1. What might I be missing as part of the installation request?
2. Is there any way to make the "Installing ..." log lines a bit more verbose, specifically, to provide the installation target directories?  Or is there a standard mapping from the listed "cygfile:///..." path to the target directory?
3. Are there any errors that might be getting inserted into the log and not at the beginning or end, so would be hard to catch?  (I'm not seeing any.)

I've taken at least 4 runs at this wall, with zero successes.

Thanks,

-rjs

-----Original Message-----
From: [hidden email] <[hidden email]> On Behalf Of Marco Atzeri
Sent: Monday, January 20, 2020 7:33 PM
To: [hidden email]
Subject: Re: Getting Python on Windows points USER_HOME

Am 21.01.2020 um 01:08 schrieb R Steiger:
> Having installed the latest Cygwin-built Python distro (3.8.1), it thinks user-site is C:\Users\<myName>\AppData\Roaming ...
>

How ?
the Python 3.8 available from Cygwin is under

     2019-09-15 19:58     2674707 usr/bin/libpython3.8.dll
     2019-09-15 19:58          78 usr/bin/pydoc3.8
     2019-09-15 19:58        9235 usr/bin/python3.8.exe
     2019-09-15 19:58       47261 usr/include/python3.8/pyconfig.h
     2019-09-15 19:59           0 usr/lib/python3.8/lib-dynload/
     2019-09-15 19:58       46099
usr/lib/python3.8/lib-dynload/array.cpython-38-x86_64-cygwin.dll

see
https://cygwin.com/packages/x86_64/python38/python38-3.8.0-0.5.b4


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Getting Python on Windows points USER_HOME

marco atzeri-4
Am 21.01.2020 um 06:47 schrieb R Steiger:
> Hi Marco,
>
> Thanks for the response.  As you seemed to hint, seems my Python installation was bent: I checked your dir listing against my Cygwin root directory (C:\cygwin64), and found that neither usr/bin nor usr/lib exist (usr/include/python3.8/pyconfig.h does exist).

Please bottom posting and trim here.

/usr/bin and /usr/lib are cygwin mount to /bin and /lib
they do not exist in Windows tree structure

$ mount
D:/cygwin64/bin on /usr/bin type ntfs (binary,auto)
D:/cygwin64/lib on /usr/lib type ntfs (binary,auto)


  I've made several attempts to do full reinstalls of python3.8, being
careful to first scrape-off all previously-installed python files
(including tools, other packages, and those in my Windows USER_HOME and
on C:), and have yet to succeed in getting it to install in anything
like the configuration you listed, and get a working Python.
>
> Looking at C:\cygwin64\var\log\setup.log.full, there are a few thousand lines of the form "Installing file cygfile:///usr/bin/python3.8.exe" (preceded by about the same number of "unlink" + "rmdir" lines), but no indication of where the files are installed on disk.  The installer asks for no additional parameters, so it doesn't seem that I'm failing to provide some required bit of info.

the file list is under /etc/setup/python36.lst.gz (and similar)

you can read directly also with

$ cygcheck -l python36
/usr/bin/libpython3.6m.dll
/usr/bin/pydoc3.6
/usr/bin/python3.6
/usr/bin/python3.6m.exe
/usr/bin/pyvenv-3.6
/usr/include/python3.6m/pyconfig.h
/usr/lib/python3.6/lib-dynload/array.cpython-36m-x86_64-cygwin.dll
/usr/lib/python3.6/lib-dynload/audioop.cpython-36m-x86_64-cygwin.dll
/usr/lib/python3.6/lib-dynload/binascii.cpython-36m-x86_64-cygwin.dll
/usr/lib/python3.6/lib-dynload/cmath.cpython-36m-x86_64-cygwin.dll
....

and verify that all the files exist in their expected location

$ cygcheck -c python36
Cygwin Package Information
Package              Version        Status
python36             3.6.9-1        OK

> I have the following Qs:
>
> 1. What might I be missing as part of the installation request?
> 2. Is there any way to make the "Installing ..." log lines a bit more verbose, specifically, to provide the installation target directories?  Or is there a standard mapping from the listed "cygfile:///..." path to the target directory?
> 3. Are there any errors that might be getting inserted into the log and not at the beginning or end, so would be hard to catch?  (I'm not seeing any.)
>
> I've taken at least 4 runs at this wall, with zero successes.
>
> Thanks,
>
> -rjs

follow https://cygwin.com/problems.html and provide the
cygcheck.out as ATTACHMENT

Question: why you need Python 3.8 ?
The current default for Cygwin is 3.6.9

Regards
Marco




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Update to "Reporting Guidelines" on the cygwin site

David Finnie

> Please bottom posting and trim here.

(Above is copied from a recent post about a problem report.)

Being a fairly new member of this mailing list, I did carefully read the
guidelines about using the mailing list, but there was no mention of no
top posting etc. And yes, I did top post myself one time because it is
my usual habit because it is standard in the business world (for better
or worse) and some people even take offence if you address each point
because they feel that you are picking apart their entire conversation
and being confrontational. I know it is not meant that way here, but it
becomes a habit to not do it, and to top post instead.

I've noticed that several active list members have had to mention this
no-top-posting policy (and yes, I was on the receiving end also).

Can I suggest that whoever maintains the web page with the main
discussion about mailing lists updates the instructions ? Then we can
hopefully avoid some of the angst and constant need to remind people ?

Dave


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Update to "Reporting Guidelines" on the cygwin site

Doug Henderson
On Mon, 20 Jan 2020 at 23:52, David Finnie <> wrote:
(snipped)
> Being a fairly new member of this mailing list, I did carefully read the
> guidelines about using the mailing list, but there was no mention of no
(snipped)
> Dave

As a long time user of cygwin and this mailing list, and a Gmail user
since it was an invitational-only beta product, I have developed a few
habits that help me adhere to the message styles and forms used by
many other posters on this mailing list.

1, I click Reply or Reply to All and trim the list of recipients to
only the list address which shows as cygwin ([hidden email]). Often
I add my own address as a BCC, because the list manager will not echo
my message.

2, I pop-out the reply so it in a separate browser window (or tab).
(This makes it easier to switch back and forth between my reply and
the original message.)

3, I change the message mode to Plain text mode. This eliminates the
HTML part of the reply, which will get the message rejected.

4. I click the ellipsis to display the quoted message, and remove the
pair of blank lines before the header for the quoted message.

5. I edit the header for the quoted message to remove the email
address of the recipient (a courtesy to the author), and remove the
author's signature lines but leave my own Gmail generated signature.

At this point I am ready to complete my reply. Here, I could pass the
buck, so to speak, to the many email guides on the internet. Since
this message is mainly about Gmail, you can just visit
https://www.google.com/search?q=email+guides and go from there, But
for another ¢¢ you get this …

In the cygwin mailing lists the reply often takes one of two forms.
The simplest is full or partial quote and reply (like this one); the
other is a point by point reply.

In the simplest form, I may remove part of the original message,
leaving enough to show the context of my message within the stream of
messages from the original to the current message. Sometimes for
clarity, I will add something like (snipped) or <elided> to indicate
where I have remove some of the previous message. Then I add the main
body of my reply between the remaining quoted text and my signature.

The more complex form is an extension to the previous where I may
insert responses to specific questions or subject matter on location
in the original post. Again, if I remove OP's text, I try to leave
enough of the original to provide context.

And finally, a reminder that you can visit the Cygwin Project mailing
list archives at https://cygwin.com/ml/cygwin/ to view messages you
don't have available
locally.

HTH,
Doug

PS: Use a spell checker if you can, but more importantly, proof read
(before you hit send), so you can fix typos and thinkos.

--
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Getting Python on Windows points USER_HOME

Doug Henderson
In reply to this post by R Steiger
On Mon, 20 Jan 2020 at 17:08, R Steiger <> wrote:
>
> Having installed the latest Cygwin-built Python distro (3.8.1), it thinks user-site is C:\Users\<myName>\AppData\Roaming ...

The latest python3 available via cygwin setup on 2020-01-21 is

$ python3.8 -V
Python 3.8.0b4

$ ls -l /usr/bin/python*.exe
-rwxr-xr-x 1 Admin None 9.1K Mar 20  2019 /usr/bin/python2.7.exe*
-rwxr-xr-x 1 Admin None 9.6K Jul 21  2019 /usr/bin/python3.5m.exe*
-rwxr-xr-x 1 Admin None 9.6K Jul 21  2019 /usr/bin/python3.6m.exe*
-rwxr-xr-x 1 Admin None 9.1K Jul 21  2019 /usr/bin/python3.7m.exe*
-rwxr-xr-x 1 Admin None 9.1K Sep 15 13:58 /usr/bin/python3.8.exe*

If you are running 3.8.1, as of today, you must have built it
yourself, or you are running the windows version of python. You can
check this by executing

$ which python3.8
/usr/bin/python3.8

If your python is in a directory outside the /usr/bin tree, you are
not running the cygwin version of python.

When running cygwin, my path looks like this:

$ echo $PATH
/home/Doug/bin:/home/Doug/local/bin:/usr/local/bin:/usr/bin:/usr/lib/lapack:/bin

If you have any windows folders in your path, they should (must)
follow these folders.

I set CYGWIN_NOWINPATH=1 in my system environment variables, and then
append only those windows folders that I need to run specific windows
apps.

> I've munged Lib/site.py and sysconfig.py to set base = "~" when os.name == "nt", but this doesn't do the trick.  What am I missing?

These are not necessary, and may have damaged your python 3.8.1 for
windows install. I suggest you undo these changes, or better yet
reinstall python 3.8.1 for windows.

HTH,
Doug
--
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple