-2

Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\anany\AppData\Local\Programs\Python\Python311\Lib\site-packages\~ydantic_core\_pydantic_core.cp311-win_amd64.pyd' Consider using the --user option or check the permissions.

I want to Generate report but it keep getting access denied.

2 Answers2

1

2 Ideas to help fix your problem

  1. Run the command line as admin, right-click the program or command prompt and select "Run as Administrator".

If that doesn't work try this

  1. Open another command prompt as administrator, and enter the following code

pip install --user package_name

Replace "package_name" with the package you are looking to install

  • raise PydanticImportError( pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.0.2/migration/#basesettings-has-moved-to-pydantic-settings for more details. i tried installing package but it still gave me the same error – Ananya Mishra Jul 06 '23 at 08:30
1

I've run into this issue when using a package in an ipynb in vscode. I think it's "file in use" permission issues. Closing vscode and re-running the command has worked for me

Mitchell
  • 101
  • 5
  • I tried it didnt work for me – Ananya Mishra Jul 06 '23 at 08:01
  • @AnanyaMishra, try closing all code editors (restart can't hurt as well). Then run "pip uninstall pydantic". Then run "pip install pydantic". If that fails, then it could be user issues, like parker said – Mitchell Jul 06 '23 at 08:36