您现在的位置是:网站首页> 网络安全 奇技淫巧

python setup install 提示site-packages This directory does not currentlyexist

栗子2021-04-15 09:46:00奇技淫巧人已围观

简介error: can\\\'t create or remove files in install directoryThe following error occurred while trying to add or remove files in the installation directory:

测试环境:

操作系统:MAC OS

脚本环境:Python2、Python3

错误问题:安装Package时提示找不到site-packages

错误内容:

running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: '/Library/Python/3.7/site-packages/test-easy-install-60597.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/3.7/site-packages/

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

解决办法:

创建软连接,将该目录指向真实的Python包目录即可正常安装。

1.找到真实路径

通过python执行下面语句即可

import sys
print(sys.path)
2.创建软连接
sudo ln -s /Users/***/Library/Python/3.7/lib/python/site-packages/ /Library/Python/3.7/site-packages/


很赞哦!()

上一篇:利用winrar自解压捆版payload制作免杀钓鱼木马

下一篇: 这已经是最后一篇了!

相关文章

文章评论

    请先说点什么
    热门评论
    人参与,0条评论
栗子

栗子(共21篇文章)

去见你想见的人,去做你想做的事,趁阳光正好,趁微风不燥,趁你还未老。