> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to prevent the permission denied error when running "pip install" in a workspace

If you are attempting to install or upgrade packages using "pip install" in a workspace, then you may receive a permission denied error.

For example:

```
 !pip install --upgrade scikit-learn

OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/scikit-learn'
```

It's possible to install/upgrade packages in a workspace session, but you need to include the --user flag to avoid the permissions error.

For example:

```
!pip install --upgrade --user scikit-learn
```

However, this installation will not persist from run to run. If you consistently need this library upgrade, you can install this in a custom environment by following the instructions [here](https://support.domino.ai/support/s/article/Installing-Packages-And-Dependencies-1723748824009).


## Related topics

- [Troubleshooting](/knowledge-base/troubleshooting-overview.md)
- [Preventing Jupyter timeout errors when running notebooks as a batch/scheduled job](/knowledge-base/preventing-jupyter-timeout-errors-when-running-notebooks-as-a-batch-scheduled-job.md)
- [ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied:](/knowledge-base/error-could-not-install-packages-due-to-an-environmenterror-errno-13-permission-denied.md)
- [Use Restricted Environments](/cloud/admin/platform-configuration/manage-compute-environments/restricted-environments.md)
