3
ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: '//anaconda3/lib/python3.7/site-packages/***' 
// It fails on all packages I tried

I'm using Terminal to pip install packages. But it always failed with the above error.

  • System: Catalina 10.15
  • Python: 3.7
  • Anaconda3

Does anyone have any idea how to solve this?

I use python for quite a long time but just install Anaconda recently. Everything was fine before I opened Anaconda the day before yesterday and then thing began to go out of control. The default python path has been modified to Anaconda's virtual space, which can be seen in the error message.

Thanks in advance.

JsW
  • 1,682
  • 3
  • 22
  • 34

1 Answers1

2

Finally, I got a workaround.
pip install PACKAGE --user

When I checked the anaconda3 folder, I found the permissions are all read-only except for the user. enter image description here

Now packages can be successfully loaded and imported.

JsW
  • 1,682
  • 3
  • 22
  • 34