'pathlib' obsolete backport of a standard library package and incompatible with PyInstaller

1,777 views
Skip to first unread message

Dionysis Boukouvalas

unread,
Jul 2, 2023, 6:30:16 AM7/2/23
to PyInstaller
Hello!

I'm working on a Windows 64 system. I'm running python on Jupyter notebook through Anaconda. I succesfully transformed that .ipynb file to a .py one.

I also successfully installed PyInstaller by running “pip install pyinstaller” in the Anaconda prompt.

When I entered “pyinstaller game.py” I got the error message: "The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller."

When I checked the pathlib version with “pip install --upgrade pathlib” I got the message “Requirement already satisfied”. Anaconda and PyInstaller are also up to date.

Chat GPT suggested that “the issue you're encountering with PyInstaller is likely not related to the version of the 'pathlib' package itself. It could be a compatibility problem between PyInstaller and another package or dependency in your Python program.”

What can I do?

Chris Barker

unread,
Jul 3, 2023, 2:57:14 AM7/3/23
to pyins...@googlegroups.com
First of all, I would try cleaning up your conda environment.  

Mixing pip and conda installs can get ugly.  

You want to start from scratch, and always try to install a package from conda first, before you install with pip. 

And conda-forge can be very helpful.

NOTE: I’d try making a conda environment just for this app — keep tho gs clean. 

Second: the oaib back port should only be avaiad for old versions of Python (pre 3.5??) — recent versions have pain built in, so you should not have a patron package installed at all.

 Not sure how it got there, but a clean conda install may take care of all this for you.

Good luck. 


Finally, I’ve had some issues with using PyInstakker by with some conda packages - it’s been a while, but you may have issues with dynamic libraries.

-CHB 


--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/db77f4b4-aa49-4b06-82ad-56f7889debdbn%40googlegroups.com.
--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov

bwoodsend

unread,
Jul 3, 2023, 2:57:34 AM7/3/23
to PyInstaller
Uninstall pathlib. There's an actually maintained version already in the standard library. The one on PyPI, as the error message says, is obsolete.
Reply all
Reply to author
Forward
0 new messages