I tried installing a new package with pip on Python 3.8.5 (it was working previously) and got this error. I also tried upgrading pip with pip, and it looked like it was upgrading but didn't do so. Tried a fresh install of 3.8.5, still got it. Then I tried installing Python 3.8.0 and got the error again. I've deleted virtual environments, created new ones, checked PATH variables, uninstalled and reinstalled Python with it both in and out of the PATH.
I'm at a complete loss for words. If anyone can help, that'd be GREATLY appreciated.
I've ran pip install terminaltables
, py -m pip install terminaltables
, and specified both destination folders and target folders; e.g. py -m pip install terminaltables --target C:\Users\me\AppData\Local\Python\Python38\Lib\site-packages
. The error, every time, is ERROR: Target path exists but is not a directory, will not continue
.
This is the pip install -vvv
output:
Exception information:
Traceback (most recent call last):
File "c:\users\x\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main
status = self.run(options, args)
File "c:\users\x\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\commands\install.py", line 275, in run
raise CommandError(
pip._internal.exceptions.CommandError: Target path exists but is not a directory, will not continue.
Also, I got the machine about 2 months ago and it's been working fine up until this issue. I've tried disabling things in Windows Security, unencrypting my drives, etc.
Try typing in "pip config list" you may find configuration settings. If you see one that starts with :env: it is in an environment variable. if you have :env:.target for example it will be an environment variable named PIP_TARGET. "target may also be set at the pip global, user or site level in the pip.ini file. Most standard installations will not have any config entries. If you see a site.target, user.target, global.target or :env:.target you can unset it using "pip config unset user.target" for example. You can also delete it from the pip.ini file directly. If it is a system environment variables you can delete/unset it and try again.