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

Cannot install Pipenv from Git #3903

Closed
AlexP11223 opened this issue Aug 23, 2019 · 7 comments
Closed

Cannot install Pipenv from Git #3903

AlexP11223 opened this issue Aug 23, 2019 · 7 comments
Labels

Comments

@AlexP11223
Copy link

I was trying to install pipenv from Git as suggested in #3902 (looks like I also need to add #egg=pipenv, otherwise it gives error about this) on PopOS (Ubuntu) 19.04: pip3 install --user -e git+https://github.com/pypa/pipenv.git@master#egg=pipenv

but got this error:

alex@pop-os:~$ pip3 install --user -e git+https://github.com/pypa/pipenv.git@master#egg=pipenv
Obtaining pipenv from git+https://github.com/pypa/pipenv.git@master#egg=pipenv
  Cloning https://github.com/pypa/pipenv.git (to revision master) to ./src/pipenv 
  Installing build dependencies ... done
Requirement already satisfied: pip>=18.0 in /usr/lib/python3/dist-packages (from pipenv) (18.1)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from pipenv) (2018.8.24)
Requirement already satisfied: setuptools>=36.2.1 in /usr/lib/python3/dist-packages (from pipenv) (40.8.0)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/lib/python3/dist-packages (from pipenv) (0.3.0)
Requirement already satisfied: virtualenv in /usr/lib/python3/dist-packages (from pipenv) (15.1.0)
Installing collected packages: pipenv
  Running setup.py develop for pipenv
    Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/home/alex/src/pipenv/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=:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help
    
    error: option --user not recognized
    
    ----------------------------------------
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/home/alex/src/pipenv/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=" failed with error code 1 in /home/alex/src/pipenv/

(calling without --user is the same, it complains about some other command inside)
`

@frostming
Copy link
Contributor

frostming commented Aug 23, 2019

Why reported here? it is a pip issue. isn't it?

@AlexP11223
Copy link
Author

I don't know, could be something wrong in pipenv setup code too.

pip3 install --user -e git+https://github.com/django-extensions/django-extensions.git#egg=django-extensions from some google example seems to work.

@frostming
Copy link
Contributor

@AlexP11223 So what is the output without --user flag?

@AlexP11223
Copy link
Author

it's the same

alex@pop-os:~$ pip3 install -e git+https://github.com/pypa/pipenv.git@master#egg=pipenv
Obtaining pipenv from git+https://github.com/pypa/pipenv.git@master#egg=pipenv
  Updating ./src/pipenv clone (to revision master)
  Installing build dependencies ... done
Requirement already satisfied: pip>=18.0 in /usr/lib/python3/dist-packages (from pipenv) (18.1)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from pipenv) (2018.8.24)
Requirement already satisfied: setuptools>=36.2.1 in /usr/lib/python3/dist-packages (from pipenv) (40.8.0)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/lib/python3/dist-packages (from pipenv) (0.3.0)
Requirement already satisfied: virtualenv in /usr/lib/python3/dist-packages (from pipenv) (15.1.0)
Installing collected packages: pipenv
  Running setup.py develop for pipenv
    Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/home/alex/src/pipenv/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=:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help
    
    error: option --user not recognized
    
    ----------------------------------------
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/home/alex/src/pipenv/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=" failed with error code 1 in /home/alex/src/pipenv/

@frostming frostming reopened this Aug 23, 2019
@frostming
Copy link
Contributor

Leave it open since I don't have quota to look into it now.

@AlexP11223
Copy link
Author

AlexP11223 commented Aug 23, 2019

hm, I updated pip from 18.1 to 19.2.2 (pip3 install --upgrade setuptools pip), the error with --user is still the same but now it worked without --user and with sudo, allowing me to use pipenv via python3 -m pipenv.

alex@pop-os:~$ pip3 install --user -e git+https://github.com/pypa/pipenv.git@master#egg=pipenv
Obtaining pipenv from git+https://github.com/pypa/pipenv.git@master#egg=pipenv
  Updating ./src/pipenv clone (to revision master)
  Running command git fetch -q --tags
  Running command git reset --hard -q 9c1378a9928fbadbd7482867916e7482d5a7fd7f
  Running command git submodule update --init --recursive -q
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/lib/python3/dist-packages (from pipenv) (0.3.0)
Requirement already satisfied: pip>=18.0 in ./.local/lib/python3.7/site-packages (from pipenv) (19.2.2)
Requirement already satisfied: virtualenv in /usr/lib/python3/dist-packages (from pipenv) (15.1.0)
Requirement already satisfied: setuptools>=36.2.1 in ./.local/lib/python3.7/site-packages (from pipenv) (41.2.0)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from pipenv) (2018.8.24)
Installing collected packages: pipenv
  Running setup.py develop for pipenv
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/alex/src/pipenv/setup.py'"'"'; __file__='"'"'/home/alex/src/pipenv/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/alex/src/pipenv/
    Complete output (6 lines):
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
    
    error: option --user not recognized
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/alex/src/pipenv/setup.py'"'"'; __file__='"'"'/home/alex/src/pipenv/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= Check the logs for full command output.
alex@pop-os:~$ pip3 --version
pip 19.2.2 from /home/alex/.local/lib/python3.7/site-packages/pip (python 3.7)
alex@pop-os:~$ pip3 install -e git+https://github.com/pypa/pipenv.git@master#egg=pipenv
Obtaining pipenv from git+https://github.com/pypa/pipenv.git@master#egg=pipenv
  Updating ./src/pipenv clone (to revision master)
  Running command git fetch -q --tags
  Running command git reset --hard -q 9c1378a9928fbadbd7482867916e7482d5a7fd7f
  Running command git submodule update --init --recursive -q
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: virtualenv in /usr/lib/python3/dist-packages (from pipenv) (15.1.0)
Requirement already satisfied: pip>=18.0 in ./.local/lib/python3.7/site-packages (from pipenv) (19.2.2)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from pipenv) (2018.8.24)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/lib/python3/dist-packages (from pipenv) (0.3.0)
Requirement already satisfied: setuptools>=36.2.1 in ./.local/lib/python3.7/site-packages (from pipenv) (41.2.0)
Installing collected packages: pipenv
  Running setup.py develop for pipenv
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/alex/src/pipenv/setup.py'"'"'; __file__='"'"'/home/alex/src/pipenv/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
         cwd: /home/alex/src/pipenv/
    Complete output (27 lines):
    running develop
    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.7/dist-packages/test-easy-install-10765.write-test'
    
    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:
    
        /usr/local/lib/python3.7/dist-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/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/alex/src/pipenv/setup.py'"'"'; __file__='"'"'/home/alex/src/pipenv/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 Check the logs for full command output.
alex@pop-os:~$ sudo pip3 install -e git+https://github.com/pypa/pipenv.git@master#egg=pipenv
[sudo] password for alex: 
WARNING: The directory '/home/alex/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/alex/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Obtaining pipenv from git+https://github.com/pypa/pipenv.git@master#egg=pipenv
  Updating ./src/pipenv clone (to revision master)
  Running command git fetch -q --tags
  Running command git reset --hard -q 9c1378a9928fbadbd7482867916e7482d5a7fd7f
  Running command git submodule update --init --recursive -q
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: virtualenv in /usr/lib/python3/dist-packages (from pipenv) (15.1.0)
Requirement already satisfied: setuptools>=36.2.1 in ./.local/lib/python3.7/site-packages (from pipenv) (41.2.0)
Requirement already satisfied: pip>=18.0 in ./.local/lib/python3.7/site-packages (from pipenv) (19.2.2)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from pipenv) (2018.8.24)
Requirement already satisfied: virtualenv-clone>=0.2.5 in /usr/lib/python3/dist-packages (from pipenv) (0.3.0)
Installing collected packages: pipenv
  Running setup.py develop for pipenv
Successfully installed pipenv

@frostming
Copy link
Contributor

So it seems an issue with pip and perhaps setuptools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants