mitsuhiko / pipsi

pip script installer
Other
2k stars 133 forks source link

prevent TypeError while installing on Windows #184

Closed schlamar closed 5 years ago

schlamar commented 5 years ago

Right now, installing on Windows without PATH configured raises the exception

Traceback (most recent call last):
  File "get-pipsi.py", line 237, in <module>
    main()
  File "get-pipsi.py", line 232, in main
    ensure_pipsi_on_path(args.bin_dir, not args.no_modify_path)
  File "get-pipsi.py", line 188, in ensure_pipsi_on_path
    if modify_path and os.path.exists(config_file):
  File "C:\Program Files (x86)\Python37-32\lib\genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
cs01 commented 5 years ago

Thanks for making this!

There is actually another PR out with the same diff: https://github.com/mitsuhiko/pipsi/pull/171. As you may notice, it's from August of last year. pipsi is essentially abandoned.

If you would like to use and contribute to an active project that picks up where pipsi left off, check out https://github.com/pipxproject/pipx-app

schlamar commented 5 years ago

Thanks. Sadly pipsi and pipx doesn't work on Windows with Python 3.7.2 right now...