【发布时间】:2022-01-02 20:42:25
【问题描述】:
我在基于 unix 的机器上使用 python 已经有一段时间了,但我现在正在尝试使用 windows 机器在本地安装我制作的一些包。
我通常在 unix 中使用 setup.py 导航到文件夹并在终端中运行以下命令
python -m pip install -e .
在我的 windows 机器上,我安装了Windows Terminal,它使用了 powershell。尝试与我得到的相同的东西:
C:\Users\username\AppData\Local\Temp\pip-build-env-bohtedqu\overlay\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
error: cant create or remove files in install directory
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
我已经查找了如何解决此问题,但没有任何效果。我试过以管理员身份启动 Windows 终端,得到同样的结果。我还尝试下载gsudo 并将 sudo 添加到命令的开头,没有任何变化。我真的不太熟悉 windows 上的 python,所以我可能会做一些非常愚蠢的事情,任何建议都值得赞赏。
【问题讨论】:
标签: python python-3.x windows powershell windows-terminal