PYTHONPATH环境安装目录

问题描述

我尝试安装一个python库并得到以下错误

ERROR: Command errored out with exit status 1:
     command: /usr/site/hpc/x86_64/generic/Anaconda3/2020.03/bin/python -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/home/c703/c7031329/fairseq/setup.py'"'"'; __file__='"'"'/home/c703/c7031329/fairseq/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: /home/c703/c7031329/fairseq/
    Complete output (28 lines):
    running develop
    WARNING: The user site-packages directory is disabled.
    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/site/hpc/x86_64/generic/Anaconda3/2020.03/lib/python3.7/site-packages/test-easy-install-2880592.write-test'
    
    The installation directory you specified (via --install-dir,--prefix,or
    the distutils default setting) was:
    
        /usr/site/hpc/x86_64/generic/Anaconda3/2020.03/lib/python3.7/site-packages/
    
    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.
    
    For information on other options,you may wish to consult the
    documentation at:
    
      https://setuptools.readthedocs.io/en/latest/easy_install.html
    
    Please make the appropriate changes for your system and try again.
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/site/hpc/x86_64/generic/Anaconda3/2020.03/bin/python -c 'import sys,tokenize; sys.argv[0] = '"'"'/home/c703/sdacc/fairseq/setup.py'"'"'; __file__='"'"'/home/c703/c7031329/fairseq/setup.py'"'"';f=getattr(tokenize,'"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.

由于我没有对机器的管理访问权限,因此我使用以下方法获取 PAYTHONPATH 的目录:

import sys

for p in sys.path:
    print(p)

然后,当上述脚本返回时,我尝试将其安装在目录中。但是,我又收到了同样的错误

有什么解决办法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...