error: error in 'egg_base' option: 'src' does not exist or is not a directory
error: error in 'egg_base' option: 'src' does not exist or is not a directory
我正在尝试在 Pycharm CE Ubuntu 18.04 中安装 Python 打包工具,但出现此错误。
执行命令:
/tmp/tmpl3kyfibgpycharm-management/pip-10.0.1/setup.py install
发生错误:error: error in 'egg_base' option: 'src' does not exist or is not a directory
命令输出:
running install
running bdist_egg
error: error in 'egg_base' option: 'src' does not exist or is not a directory
我也试过pip install src
这个也不行。
选择Project Interpreter的路由时,最好select路由'/usr/bin/python3'
而不是'/usr/bin/python3.6'
。
对于 python 3,您必须使用
安装它
sudo apt-get install python3-pip
它将适用于 python 2.7
sudo apt-get install python-pip
当 jython 从 setup.py 文件夹外部 运行 setup.py 时,我遇到了类似的问题(就像你的情况一样)。
我不知道根本原因,但是当您将文件夹更改为 setup.py 和 scr 文件夹所在的位置时,安装完成。
cd /tmp/tmpl3kyfibgpycharm-management/pip-10.0.1
python setup.py install
将您的解释器更改为 (VENV) 而不是用户
正如用户 11507396 所述,我刚刚将我的解释器更改为 VENV(虚拟解释器)并且它起作用了。如果你使用的是PyCharm,你可以这样操作:
转到设置 -> 项目解释器 -> 添加
选择你需要的任何东西。在我的例子中,选择 python3 作为基础解释器解决了问题。
我正在尝试在 Pycharm CE Ubuntu 18.04 中安装 Python 打包工具,但出现此错误。
执行命令:
/tmp/tmpl3kyfibgpycharm-management/pip-10.0.1/setup.py install
发生错误:error: error in 'egg_base' option: 'src' does not exist or is not a directory
命令输出:
running install
running bdist_egg
error: error in 'egg_base' option: 'src' does not exist or is not a directory
我也试过pip install src
这个也不行。
选择Project Interpreter的路由时,最好select路由'/usr/bin/python3'
而不是'/usr/bin/python3.6'
。
对于 python 3,您必须使用
安装它sudo apt-get install python3-pip
它将适用于 python 2.7
sudo apt-get install python-pip
当 jython 从 setup.py 文件夹外部 运行 setup.py 时,我遇到了类似的问题(就像你的情况一样)。 我不知道根本原因,但是当您将文件夹更改为 setup.py 和 scr 文件夹所在的位置时,安装完成。
cd /tmp/tmpl3kyfibgpycharm-management/pip-10.0.1
python setup.py install
将您的解释器更改为 (VENV) 而不是用户
正如用户 11507396 所述,我刚刚将我的解释器更改为 VENV(虚拟解释器)并且它起作用了。如果你使用的是PyCharm,你可以这样操作:
转到设置 -> 项目解释器 -> 添加
选择你需要的任何东西。在我的例子中,选择 python3 作为基础解释器解决了问题。