Skip to content

Fix pip-not-found Error In Windows #57

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
A list of super awesome scripts which help automate the boring tasks.

## So far added
| Script | Contributor|
| Script | Contributor |
|--|--|
|[file_encrypt_decrypt](https://github.com/adityaarakeri/super-scripts/tree/master/file_encrypt_decrypt) | [Adi](https://github.com/adityaarakeri) |
|[app_opener](https://github.com/adityaarakeri/super-scripts/tree/master/app_opener) | [U-ways](https://github.com/U-ways) |
Expand All @@ -16,18 +16,16 @@ A list of super awesome scripts which help automate the boring tasks.
| [wifi_to_eth](https://github.com/adityaarakeri/super-scripts/tree/master/wifi_to_eth) | [crouther](https://github.com/crouther)
|[file_finder](https://github.com/adityaarakeri/super-scripts/tree/master/file_finder) | [poszy](https://github.com/poszy) |
| [makere](https://github.com/adityaarakeri/super-scripts/tree/master/makere) | [aksJain0](https://github.com/aksJain0)

|[Sha1-brutefore](https://github.com/adityaarakeri/super-scripts/tree/master/Sha1-brutefore) | [nitish](https://github.com/nitishsai9) |
|[portScanner](https://github.com/adityaarakeri/super-scripts/tree/master/portScanner) | [nitish](https://github.com/nitishsai9) |

|[loop_command](https://github.com/adityaarakeri/super-scripts/tree/master/loop_command) | [jeancsil](https://github.com/jeancsil)
| [autofill_information](https://github.com/adityaarakeri/super-scripts/tree/master/autofill_information) | [pcube99](https://github.com/pcube99)
|[raw_to_jpeg](https://github.com/adityaarakeri/super-scripts/tree/master/raw_to_jpeg) | [Sadeed](https://github.com/Sadeed)
|[rename_images_exif_date](https://github.com/adityaarakeri/super-scripts/tree/master/rename_images_exif_date) | [asperduti](https://github.com/asperduti)
| [weather_in_a_city](https://github.com/adityaarakeri/super-scripts/tree/master/weather_in_a_city) | [vish1811](https://github.com/vish1811)
| [Movie_Recommendation](https://github.com/adityaarakeri/super-scripts/tree/master/Movie_Recommendation) | [vish1811](https://github.com/vish1811)
| [translate_excel](https://github.com/adityaarakeri/super-scripts/tree/master/translate_excel) | [loukotal](https://github.com/loukotal)

| [fix_pip_path](/fix_pip) | [dsp9107](https://github.com/dsp9107) |

## Contribuition Guidelines
- Make a **separate folder** for your script.
Expand Down
2 changes: 1 addition & 1 deletion file_encrypt_decrypt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ $ pipenv run python crypt -d file.enc
```
**note**
- `file.enc` will be created if you pass in `file.txt`
- Do not loose the Encryption 🗝
- Do not lose the Encryption 🗝
16 changes: 16 additions & 0 deletions fix_pip/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# fix_pip

Fixes `'pip' not found` Error In Windows .

### Requirements

Runtime Environment And Required Python Packages :
- Windows Platform
- Python 3.7.3 +
- subprocess
- ctypes

### Usage

- run `fix_pip_error.py`
- done
22 changes: 22 additions & 0 deletions fix_pip/fix_pip_error.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os, sys, ctypes
import subprocess as sp

def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin()
except:
return False

if is_admin():

py_path = os.getcwd()

f=open("update.bat","w+")
f.write("setx /m Path \"%Path%" + py_path + ";" + py_path+"\Scripts;\"\n")
#f.write("pause")
f.close()

sp.call("update.bat")

else:
ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, __file__, None, 1)