日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python提示install无效_为什么是python设置.py给我“错误:选项installdir无法识别”错误?...

發布時間:2025/3/15 python 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python提示install无效_为什么是python设置.py给我“错误:选项installdir无法识别”错误?... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

當我嘗試將python項目安裝到自定義的本地python repo中時,我使用以下命令:python setup.py install --install-dir /home/peng/python-temp

在哪里設置.py是python項目Keras的簡單setuptools腳本:

但此命令會觸發以下錯誤:

^{pr2}$

為什么錯誤提示中的參數不存在?我應該用什么來代替它呢?在

更新1

參數--install dir由以下錯誤信息提示設置.py公司名稱:python setup.py install

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 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/test-easy-install-13269.write-test'

The installation directory you specified (via --install-dir, --prefix, or

the distutils default setting) was:

/usr/local/lib/python3.6/dist-packages/

UPDATE2我嘗試了'--prefix'選項,得到的結果是:python setup.py install --prefix /home/peng/python-temp

running install

Checking .pth file support in /home/peng/python-temp/lib/python3.6/site-packages/

/opt/conda3/bin/python -E -c pass

TEST FAILED: /home/peng/python-temp/lib/python3.6/site-packages/ does NOT support .pth files

error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not

on PYTHONPATH and which Python does not read ".pth" files from. The

installation directory you specified (via --install-dir, --prefix, or

the distutils default setting) was:

/home/peng/python-temp/lib/python3.6/site-packages/

and your PYTHONPATH environment variable currently contains:

''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is

on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment

variable. (It must then also be on PYTHONPATH whenever you run

Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by

using one of the approaches described here:

https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.

所以他們都不管用。在

總結

以上是生活随笔為你收集整理的python提示install无效_为什么是python设置.py给我“错误:选项installdir无法识别”错误?...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。