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

ImportError: cannot import name '_PosixFlavour' from 'pathlib' #100

Closed
tomsturges opened this issue Feb 9, 2024 · 2 comments
Closed

ImportError: cannot import name '_PosixFlavour' from 'pathlib' #100

tomsturges opened this issue Feb 9, 2024 · 2 comments

Comments

@tomsturges
Copy link

I'm getting the following error and I'm not really sure how to start fixing this problem.

$ euporie-notebook optimization_twodevices_FAU_angular_Jan2024.ipynb
Traceback (most recent call last):
  File "/Users/tomsturges/.local/bin/euporie-notebook", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/tomsturges/Library/Application Support/pipx/venvs/euporie/lib/python3.12/site-packages/euporie/notebook/__main__.py", line 8, in main
    from euporie.core import __main__
  File "/Users/tomsturges/Library/Application Support/pipx/venvs/euporie/lib/python3.12/site-packages/euporie/core/__init__.py", line 14, in <module>
    from euporie.core import path  # noqa F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tomsturges/Library/Application Support/pipx/venvs/euporie/lib/python3.12/site-packages/euporie/core/path.py", line 11, in <module>
    import upath
  File "/Users/tomsturges/Library/Application Support/pipx/venvs/euporie/lib/python3.12/site-packages/upath/__init__.py", line 2, in <module>
    from upath.core import UPath
  File "/Users/tomsturges/Library/Application Support/pipx/venvs/euporie/lib/python3.12/site-packages/upath/core.py", line 8, in <module>
    from pathlib import _PosixFlavour  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name '_PosixFlavour' from 'pathlib' (/opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py)
@joouha
Copy link
Owner

joouha commented Feb 9, 2024

Technically euporie does not support Python 3.12 ... yet.

I'm still waiting on a new release of universal_pathlib compatible with 3.12 (see here). This should happen any day now.

There have been some fairly major changes to the pathlib standard library in 3.12, which has made things a bit more complicated for universal_pathlib than usual.

As soon as it's out, I'll make a new release of euporie ⚡

@joouha
Copy link
Owner

joouha commented Mar 7, 2024

This should be fixed in the latest release, v2.8.1

@joouha joouha closed this as completed Mar 7, 2024
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

No branches or pull requests

2 participants