5

I work with python 2.7.8 and can't change the version of python because it affect other important programs. Continuously to Unzip zip files in folders and subfolders with python i don't know how to install "pip install pathlib". Any help would be great.

Community
  • 1
  • 1
newGIS
  • 598
  • 3
  • 10
  • 26
  • Do you mean you don't know how install the `pip` executable itself (should already be installed with Python), or that you get an error when you try `pip install pathlib` to install the package? If so, paste the error message. – smci Jun 16 '15 at 22:47
  • This question may well be a duplicate, there are many other posts on [pip install](http://stackoverflow.com/search?q=pip+install+) issues/errors. – smci Jun 16 '15 at 22:48
  • In python 2, the pathlib library has been backported as pathlib2, so at the command line run `pip install pathlib2` – Davos Apr 22 '18 at 13:21

2 Answers2

0

If on windows, type this from Command Prompt to get pathlib for Python 2.7.8: python -m pip install pathlib2

If you're on a unix distro, type this from BASH (any shell): pip install pathlib2

If on mac, from terminal: sudo easy_install pip pip install pathlib2

And now you should be able to import pathlib2 (backported version of pathlib) from Python 2.7.8.

user96931
  • 103
  • 7
0

i succeed install pathlib2 module by enter into the cmd.exe and writing:

cd C:\Users\jon\AppData\Local\Programs\Python\Python38-32\Scripts pip install pathlib2

newGIS
  • 598
  • 3
  • 10
  • 26