Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install -e ./ error. #384

Closed
ramwin opened this issue Mar 8, 2022 · 3 comments
Closed

pip install -e ./ error. #384

ramwin opened this issue Mar 8, 2022 · 3 comments

Comments

@ramwin
Copy link

ramwin commented Mar 8, 2022

When I run pip3 install -e ./, it will raise Permission Denied.

[#72#wangx@manjaro-5800:python-dotenv (package)] $ pip3 install -e ./
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///home/wangx/github/other/python-dotenv
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Installing collected packages: python-dotenv
  Running setup.py develop for python-dotenv
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/wangx/github/other/python-dotenv/setup.py'"'"'; __file__='"'"'/home/wangx/github/other/python-dotenv/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: /home/wangx/github/other/python-dotenv/
    Complete output (32 lines):
    running develop
    /tmp/pip-build-env-p9vh8t3t/overlay/lib/python3.10/site-packages/setuptools/command/easy_install.py:160: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    WARNING: The user site-packages directory is disabled.
    /tmp/pip-build-env-p9vh8t3t/overlay/lib/python3.10/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: 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/lib/python3.10/site-packages/test-easy-install-4131.write-test'
    
    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:
    
        /usr/lib/python3.10/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.pypa.io/en/latest/deprecated/easy_install.html
    
    Please make the appropriate changes for your system and try again.
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/wangx/github/other/python-dotenv/setup.py'"'"'; __file__='"'"'/home/wangx/github/other/python-dotenv/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.

My python is 3.10.2 and pip version is 21.2.4

[#74#wangx@manjaro-5800:python-dotenv (package)] $ python3 --version
Python 3.10.2
[#75#wangx@manjaro-5800:python-dotenv (package)] $ pip3 --version
pip 21.2.4 from /home/wangx/.local/lib/python3.10/site-packages/pip (python 3.10)
[#76#wangx@manjaro-5800:python-dotenv (package)] $ uanme -a
bash: uanme:未找到命令
[#77#wangx@manjaro-5800:python-dotenv (package)] $ uname -a
Linux manjaro-5800 5.4.181-2-MANJARO #1 SMP PREEMPT Mon Feb 28 01:15:30 UTC 2022 x86_64 GNU/Linux
@ramwin
Copy link
Author

ramwin commented Mar 8, 2022

I'm doing this because I want to create a pull request. It's simple, and I have tested it manually..

@theskumar
Copy link
Owner

Defaulting to user installation because normal site-packages is not writeable

Are you using a venv https://docs.python.org/3/tutorial/venv.html ?

@ramwin
Copy link
Author

ramwin commented Apr 28, 2022

Thank you. I know what's the problem now. I did not use a venv.

@ramwin ramwin closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants