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

suppress_output isn't compatible with Windows, causing install-at-import to fail #96

Closed
dap-biospec opened this issue Mar 1, 2024 · 5 comments · Fixed by #104
Closed

Comments

@dap-biospec
Copy link

dap-biospec commented Mar 1, 2024

Fresh installation using:

pip install -U autoeis
... [success] 

followed by:

import numpy as np
import autoeis as ae
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python\Python312\Lib\site-packages\autoeis\__init__.py", line 1, in <module>
    from . import core, io, metrics, parser, utils, visualization  # noqa: F401, E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ....
  File "D:\Python\Python312\Lib\site-packages\juliapkg\install_julia.py", line 23, in log
    print(prefix, *args)
OSError: [WinError 1] Incorrect function
[juliapkg] Locating Julia ^1.6.1

 # Load test dataset shipped with AutoEIS
 Z, freq = ae.io.load_test_dataset()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'ae' is not defined

Same behavior with standalone or Microsoft store installation; with or without Julia pre-installed.

Recommendations?

@ma-sadeghi
Copy link
Collaborator

@dap-biospec Sorry for the late reply. Not sure about the root cause, but I believe this should now be fixed. Could you please give it another try? (ideally in a fresh virtualenv just in case)

@ma-sadeghi
Copy link
Collaborator

Since our automated tests are currently passing for the combination of Windows and Python 3.12, I'll close this issue, but feel free to re-open if you still can't import autoeis.

@dap-biospec
Copy link
Author

@ma-sadeghi Package us is now locating Julia versions "~1.6.1, ~1.7, ~1.8, ~1.9, =1.10.0" but returns the same "OSError: [WinError 1] Incorrect function." Subsequent code returns "name 'ae' is not defined"

@ma-sadeghi
Copy link
Collaborator

@dap-biospec What Python distribution do you use? Anaconda, Pyenv, etc., or did you download it directly from Python.org?

@ma-sadeghi ma-sadeghi reopened this Apr 1, 2024
@ma-sadeghi ma-sadeghi changed the title Package does not load on fresh Win64 Python 3.12.2 install suppress_output isn't compatible with Windows, causing install-at-import to fail Apr 1, 2024
@ma-sadeghi
Copy link
Collaborator

@dap-biospec Sorry for the frustration. I got my hands on a Windows machine this morning, and figured out the root cause. It's now fixed, please upgrade autoeis, and should be good to go.

PS. The reason our Windows CI was not failing was because we were using the CLI approach to install Julia dependencies (python -m autoeis install), which worked fine, but the install-at-first-import didn't, which wasn't tested. Now, all CIs install Julia dependencies at import, so it's now fully covered in case something goes wrong in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants