LeMoussel / pydbhub

A Python library for accessing and using SQLite databases on DBHub.io
MIT License
32 stars 5 forks source link

Install Fails (Python 3.8, Windows 11) #4

Closed johns1c closed 1 year ago

johns1c commented 1 year ago

Windows install fails (with no error)

on Windows 11 with Python 3.8 at a Dos command prompt I ran

pip install pydbhub

the log suggested that it installed the required packages but it did not install pydbhub itself

there were no errors, at the end of the install

lib\site-packages\pydbhub-0.0.3.dist-info was created lib\site-packages\pydbhub was not created (but if I manually create the directory and copy the three py files from github it works)

The install log


(z99) C:\Users\Chris Johnson\Python\z99>pip list
Package    Version
---------- -------
pip        21.1.1
setuptools 56.0.0
WARNING: You are using pip version 21.1.1; however, version 22.3.1 is available.
You should consider upgrading via the 'c:\users\chris johnson\python\z99\scripts\python.exe -m pip install --upgrade pip' command.

(z99) C:\Users\Chris Johnson\Python\z99>pip install pydbhub
Collecting pydbhub
  Using cached pydbhub-0.0.3-py37-none-any.whl (3.0 kB)
Collecting requests
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting rich
  Using cached rich-12.6.0-py3-none-any.whl (237 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting pygments<3.0.0,>=2.6.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting commonmark<0.10.0,>=0.9.0
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Collecting typing-extensions<5.0,>=4.0.0
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Installing collected packages: urllib3, typing-extensions, six, pygments, idna, commonmark, charset-normalizer, certifi, rich, requests, python-dateutil, pydbhub
Successfully installed certifi-2022.9.24 charset-normalizer-2.1.1 commonmark-0.9.1 idna-3.4 pydbhub-0.0.3 pygments-2.13.0 python-dateutil-2.8.2 requests-2.28.1 rich-12.6.0 six-1.16.0 typing-extensions-4.4.0 urllib3-1.26.12
WARNING: You are using pip version 21.1.1; however, version 22.3.1 is available.
You should consider upgrading via the 'c:\users\chris johnson\python\z99\scripts\python.exe -m pip install --upgrade pip' command.

(z99) C:\Users\Chris Johnson\Python\z99>

after the install libraries such as rich are installed correctly but pydbhub is missing although pip lists it

(z99) C:\Users\Chris Johnson\Python\z99>dir .\lib\site-packages\pydb*
 Volume in drive C is OS
 Volume Serial Number is 1EFF-F90D

 Directory of C:\Users\Chris Johnson\Python\z99\lib\site-packages

18/11/2022  20:45    <DIR>          pydbhub-0.0.3.dist-info
               0 File(s)              0 bytes
               1 Dir(s)  74,464,223,232 bytes free

(z99) C:\Users\Chris Johnson\Python\z99>
justinclift commented 1 year ago

Oh, that's interesting. Wonder if it's a permissions problem or something? Note that I'm not a Python guy any more (it's been years), so hopefully @LeMoussel has some good suggestions. :smile:

LeMoussel commented 1 year ago

It seems that you use Virtualenv. pip when used with virtualenv will generally install packages in the path <virtualenv_name>/lib/<python_ver>/site-packages. What is result of pip show pydbhub?

johns1c commented 1 year ago

Result of pip show pydbhub (having recreated the environment)

Name: pydbhub
Version: 0.0.3
Summary: A Python library for accessing and using SQLite databases on DBHub.io
Home-page: https://github.com/LeMoussel/pydbhub
Author: LeMoussel
Author-email: ***@***.***
License: MIT
Location: c:\users\chris johnson\python\z99\lib\site-packages
Requires: rich, requests, python-dateutil
Required-by:

p.s. it also happens without using a virtual environment

C:\Users\Chris Johnson>pip  show pydbhub
Name: pydbhub
Version: 0.0.3
Summary: A Python library for accessing and using SQLite databases on DBHub.io
Home-page: https://github.com/LeMoussel/pydbhub
Author: LeMoussel
Author-email: ***@***.***
License: MIT
Location: c:\python38\lib\site-packages
Requires: python-dateutil, requests, rich
Required-by:

C:\Users\Chris Johnson>dir c:\Python38\lib\site-packages\pydb* Volume in drive C is OS Volume Serial Number is 1EFF-F90D

Directory of c:\Python38\lib\site-packages

18/11/2022 19:46

pydbhub-0.0.3.dist-info 0 File(s) 0 bytes 1 Dir(s) 74,021,036,032 bytes free

could try it with Python 3.10 or 3.11 if you want

Chris

Sent from Mail for Windows

From: LeMoussel Sent: 20 November 2022 08:15 To: LeMoussel/pydbhub Cc: C Johnson; Author Subject: Re: [LeMoussel/pydbhub] Install Fails (Python 3.8, Windows 11)(Issue #4)

It seems that you use Virtualenv. pip when used with virtualenv will generally install packages in the path /lib//site-packages. What is result of pip show pydbhub? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

LeMoussel commented 1 year ago

Could you try it with Python 3.9?

johns1c commented 1 year ago

I have just downloaded the package from PyPi and opened it with 7zip.

Looking at other packages it seems that the wheel should contain two top level directories.

pydbhub pydbhub-0.0.3.dist_info

the first should contain the python code and is missing which explains why it never appears in my site-packages

Sent from Mail for Windows

From: LeMoussel Sent: 21 November 2022 15:59 To: LeMoussel/pydbhub Cc: C Johnson; Author Subject: Re: [LeMoussel/pydbhub] Install Fails (Python 3.8, Windows 11)(Issue #4)

Could you try it with Python 3.9? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

LeMoussel commented 1 year ago

I could reproduce. When I do pip install git+https://github.com/LeMoussel/pydbhub.git, I get

......
Installing collected packages: pydbhub
  DEPRECATION: pydbhub is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. 
A possible replacement is to enable the '--use-pep517' option. 
Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for pydbhub ... done
Successfully installed pydbhub-0.0.3

Pip just got a massive update. I believe that this doesn't build the wheel. Hopefully we can come up with a solution soon.

LeMoussel commented 1 year ago

Seems to be OK with pyproject.toml file. Updated in Version 0.0.4.

dir .\lib\site-packages\pydb*

24/11/2022  16:28    <DIR>          pydbhub
24/11/2022  16:28    <DIR>          pydbhub-0.0.4.dist-info
johns1c commented 1 year ago

Many thanks for fixing it C J

------ Original Message ------ From: "LeMoussel" @.> To: "LeMoussel/pydbhub" @.> Cc: "C Johnson" @.>; "Author" @.> Sent: Wednesday, 2022 Nov 23 At 15:36 Subject: Re: [LeMoussel/pydbhub] Install Fails (Python 3.8, Windows 11) (Issue #4)

Seems to be OK with pyproject.toml file. Updated in Version 0.0.4. dir .\lib\site-packages\pydb*24/11/2022 16:28

pydbhub24/11/2022 16:28 pydbhub-0.0.4.dist-info — Reply to this email directly, view it on GitHub https://github.com/LeMoussel/pydbhub/issues/4#issuecomment-1325265874 , or unsubscribe https://github.com/notifications/unsubscribe-auth/APANCD7KK36UKIHUIGANX6LWJY2XRANCNFSM6AAAAAASE4AYRA . You are receiving this because you authored the thread.Message ID: @.***>

justinclift commented 1 year ago

@LeMoussel This issue seems like it can be closed? :smile: