0

i tried to use this command in cmd to install module certifi:

pip install certifi

But it throws some warning like this:

WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)

How can i fix it and install certifi ? (Python 3.9.6 )

Hoàng Huy
  • 35
  • 6
  • Does this answer your question? [pip how to remove incorrectly installed package with a leading dash: "-pkgname"](https://stackoverflow.com/questions/56973015/pip-how-to-remove-incorrectly-installed-package-with-a-leading-dash-pkgname) – Marcelo Zárate Dec 09 '21 at 13:48

3 Answers3

0

Try using [virtual enviroments][1]: on your CMD go intro your projects folder and create a new one typing

python -m venv <name-of-your-project>

activate the virtual enviroment with:

(Windows)

cd /<name-of-your-project>/Scripts/
activate

(Linux)

cd /<name-of-your-project>/bin/
source activate

then install the required libraries

pip install certifi etc..

and run your script

[1]: https://towardsdatascience.com/virtual-environments-104c62d48c54#:~:text=A%20virtual%20environment%20is%20a,a%20system%2Dwide%20Python).

0

go to directory of site package and remove all files that start with tilde ~ and there is a problem with the package named ip

0

Manually delete the following folder:

c:\python39\lib\site-packages\ip

And every file that starts with ~ and try again

Marcelo Zárate
  • 276
  • 4
  • 20