linux系统Defaulting to user installation because normal site-packages is not writeable
时间: 2023-08-27 07:20:14 浏览: 205
安装Linux出现的问题
在Linux系统上,当使用pip3 install virtualenv创建虚拟环境时,可能会遇到"Defaulting to user installation because normal site-packages is not writeable"的错误提示。这是因为默认情况下,pip将软件包安装到系统的site-packages目录下,而这个目录可能没有写入权限。解决这个问题有两个方法。
第一个方法是使用命令python3 -m install virtualenv或者python3 -m pip install virtualenv来安装虚拟环境。这样可以避免使用pip直接安装到系统目录,而是通过Python的模块机制安装。
另一个方法是设置USER_BASE和USER_SITE路径,这样pip的下载路径就会被修改。你可以检查一下USER_BASE和USER_SITE是否已经设置为你想要的路径,这样就可以看到pip下载时的问题是否解决了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Defaulting to user installation because normal site-packages is not writeable问题解决](https://blog.csdn.net/weixin_40433529/article/details/118580431)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [pip 安装库出错:Defaulting to user installation because normal site-packages is not writeable](https://blog.csdn.net/m0_56174109/article/details/125473155)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文