Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pb after pip install md-ulb-pwrap to use po2md on windows #7

Closed
ChristianWia opened this issue Jul 6, 2024 · 9 comments · Fixed by #8
Closed

pb after pip install md-ulb-pwrap to use po2md on windows #7

ChristianWia opened this issue Jul 6, 2024 · 9 comments · Fixed by #8
Labels
bug Something isn't working

Comments

@ChristianWia
Copy link

ChristianWia commented Jul 6, 2024

Hi. I am fighting since yesterday with the library. The windows installation gives:

C:\Users\Kriss>python -m pip install md-ulb-pwrap
Collecting md-ulb-pwrap
  Using cached md_ulb_pwrap-0.1.1-cp38-none-win_amd64.whl.metadata (1.8 kB)
Using cached md_ulb_pwrap-0.1.1-cp38-none-win_amd64.whl (111 kB)
Installing collected packages: md-ulb-pwrap
Successfully installed md-ulb-pwrap-0.1.1

C:\Users\Kriss>

Folder contents is:

E:\program\Python\Python38\Lib\site-packages\md_ulb_pwrap>dir
 Le volume dans le lecteur E s'appelle Data
 Le numéro de série du volume est 7E40-6036

 Répertoire de E:\program\Python\Python38\Lib\site-packages\md_ulb_pwrap

06/07/2024  11:15    <REP>          .
06/07/2024  11:15    <REP>          ..
06/07/2024  11:15           244 224 md_ulb_pwrap.cp38-win_amd64.pyd
06/07/2024  11:15               131 __init__.py
06/07/2024  11:15    <REP>          __pycache__
               2 fichier(s)          244 355 octets
               3 Rép(s)  310 512 758 784 octets libres

E:\program\Python\Python38\Lib\site-packages\md_ulb_pwrap>

Contents of file ini :

E:\program\Python\Python38\Lib\site-packages\md_ulb_pwrap>type __init__.py
from .md_ulb_pwrap import *

__doc__ = md_ulb_pwrap.__doc__
if hasattr(md_ulb_pwrap, "__all__"):
    __all__ = md_ulb_pwrap.__all__
E:\program\Python\Python38\Lib\site-packages\md_ulb_pwrap>

which make failure when using command: po2md e:/datatable-intro-fr.Rmd --pofiles e:/datatable-intro-fr.po --save e:/datatable-intro-fr2o.md

Traceback (most recent call last):
  File "e:\program\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "e:\program\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "E:\program\Python\Python38\Scripts\po2md.exe\__main__.py", line 4, in <module>
  File "e:\program\python\python38\lib\site-packages\mdpo\po2md\__init__.py", line 6, in <module>
    import md_ulb_pwrap
  File "e:\program\python\python38\lib\site-packages\md_ulb_pwrap\__init__.py", line 1, in <module>
    from .md_ulb_pwrap import *
ImportError: DLL load failed while importing md_ulb_pwrap: La procédure spécifiée est introuvable.

(sklearn-venv) E:\program\Python\Python38\Lib\site-packages\mdpo>

Whats wrong ? Thanks.

@ChristianWia
Copy link
Author

When installing version 0.1.0 (i.e. the previous one)

C:\Users\Kriss>python -m pip install md-ulb-pwrap==0.1.0
Collecting md-ulb-pwrap==0.1.0
  Downloading md_ulb_pwrap-0.1.0-cp38-none-win_amd64.whl.metadata (2.0 kB)
Downloading md_ulb_pwrap-0.1.0-cp38-none-win_amd64.whl (113 kB)
   ---------------------------------------- 113.5/113.5 kB 6.5 MB/s eta 0:00:00
Installing collected packages: md-ulb-pwrap
Successfully installed md-ulb-pwrap-0.1.0

C:\Users\Kriss>

the command po2md is now successful
po2md e:/datatable-intro-fr.Rmd --pofiles e:/datatable-intro-fr.po --save e:/datatable-intro-fr2o.md

C:\Users\Kriss>dir e:*.md
 Le volume dans le lecteur E s'appelle Data
 Le numéro de série du volume est 7E40-6036
Répertoire de E:\
06/07/2024  21:42            33 040 datatable-intro-fr2o.md
               1 fichier(s)           33 040 octets
               0 Rép(s)  310 513 532 928 octets libres
C:\Users\Kriss>

so there is a problem for Windows with the generated version 0.1.1. Can you have a look ? Thanks.

@ChristianWia
Copy link
Author

hi, could we expect to have an operational version for Windows ? Thanks.

@mondeja
Copy link
Owner

mondeja commented Aug 1, 2024

Sorry for the delay. I think that is fixed by v0.1.2. Could you give a try, please?

@ChristianWia
Copy link
Author

ChristianWia commented Aug 1, 2024 via email

@mondeja mondeja reopened this Aug 1, 2024
@mondeja
Copy link
Owner

mondeja commented Aug 1, 2024

I can not replicate on Python v3.12.4 (6 Jun) on Windows AMD 64 bits. Do you've experienced the same problem with other versions of Python?

Is something probably related with your environment. See https://support.pyxll.com/hc/en-gb/articles/4404027796627--DLL-load-failed-The-specified-procedure-could-not-be-found-when-importing-win32api-or-win32com#:~:text=The%20problem%20occurs%20because%20the,old%20versions%20of%20the%20%22pythoncomXX.

@ChristianWia
Copy link
Author

ChristianWia commented Aug 2, 2024 via email

@mondeja
Copy link
Owner

mondeja commented Aug 2, 2024

The unique changes were:

  • v0.1.0 was built by maturin v1.2.0, v0.1.1 by maturin v0.14.4 and the new v0.1.2 has been built by latest maturin v1.7.0, which supports all architectures and not-EOLed Python versions.
  • pyo3 has been bumped from v0.18 to v0.21 at v0.1.1, but they still support Python3.7 onwards.

I'm pretty much sure that is related to a misconfiguration of your Python installation. There is a lot of information related to that if you search "DLL The specified procedure could not be found Python" on Google. Please, provide a reproducible example from scratch or at least a reproduction with another Python version rather than 3.8 and we'll be able to fix it.

Closing for now pending further information... Saludos.

@mondeja mondeja closed this as completed Aug 2, 2024
@ChristianWia
Copy link
Author

ChristianWia commented Aug 2, 2024 via email

@mondeja
Copy link
Owner

mondeja commented Aug 2, 2024

Probably a change in maturin and/or a change in your environment that has broken the way your machine is currently importing DLLs or how maturin treats them in Windows. Could be an error in maturin, but without further information I don't know.

See the comparison between v0.1.0 and v0.1.1, what are the affected changes? Or see the differences of distributed wheels between v0.1.0 and v0.1.1. I can not do more because don't know how to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants