1

So I created a new interpreter for my python project and it's not letting me add any packages because the "+" sign is disabled. When i click on 'install packaging tools' it throws this error:

enter image description here

I dont have much experience with virtual environments so any help would be much appreciated

I tried upgrading my pip and setuptools. I also tried https://stackoverflow.com/a/62536540/20539240 but 'packaging' module was already installed in the base python version. I can't manually add packages that i need because the '+' button is disabled. On installing through terminal it says requirement already satisfied (it's already there in the base python but i need it in the venv)

abel_2007
  • 11
  • 2
  • `HTMLParser().unescape` was removed in Python 3.9. See https://stackoverflow.com/a/65042657/7976758. Try to upgrade `setuptools`. – phd Nov 25 '22 at 11:21
  • @phd I did upgrade my setuptools before posting here but the problem still persists.. Will i need to reinstall pycharm or something? – abel_2007 Nov 25 '22 at 13:32
  • I know nothing about pycharm but reinstalling never helps. I've heard pycharm uses separate virtual environments so you need to upgrade `setuptools` in all of them, not just with default `pip`. – phd Nov 25 '22 at 13:34
  • @phd That makes sense. But how can I upgrade it for specific venv? I tried going to the venv directory and then running the pip command but it still says requirements already satisfied – abel_2007 Nov 25 '22 at 13:39
  • It's not enough to just run `pip` — in virtualenvs there're their own Pythons and `pip`s. The most correct way to run a `pip` from a virtualenv is `path/to/venv/bin/python -m pip`; in Windows it's `path\to\venv\Scripts\python -m pip` – phd Nov 25 '22 at 13:42

0 Answers0