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

gitpython Not Installed Automatically w/ setup.py #200

Closed
AlexanderProd opened this issue Dec 14, 2018 · 3 comments
Closed

gitpython Not Installed Automatically w/ setup.py #200

AlexanderProd opened this issue Dec 14, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@AlexanderProd
Copy link
Contributor

I've installed shallow-backup using pip3
$ pip3 install shallow-backup

But running shallow-backup throws this error

Traceback (most recent call last):
  File "/usr/local/bin/shallow-backup", line 7, in <module>
    from shallow_backup.__main__ import cli
  File "/usr/local/lib/python3.7/site-packages/shallow_backup/__main__.py", line 3, in <module>
    from .prompts import *
  File "/usr/local/lib/python3.7/site-packages/shallow_backup/prompts.py", line 7, in <module>
    from .git_wrapper import git_set_remote, move_git_repo
  File "/usr/local/lib/python3.7/site-packages/shallow_backup/git_wrapper.py", line 3, in <module>
    import git
ModuleNotFoundError: No module named 'git'

I've got git installed and it is working on my mac though.
Python3 is installed via brew.

Python version: 3.7.1
pip3: 18.1
macOS: 10.14.2

@alichtman
Copy link
Owner

alichtman commented Dec 14, 2018

This is a seemingly confusing error with an easy fix. It's not saying you're missing git, it's saying you're missing a package called gitpython which has a module named git.

To fix this on your machine

You should run pip3 install gitpython, however, this should be installed automatically when you run pip3 install shallow-backup.

I'm filing this as a bug, and I'll look into fixing it when I have some time.

To fix this in the repo

The error is in this section:

install_requires=[

One line is missing, which would install gitpython automatically. Do you want to make the change, see if it works for you, and then send a PR to fix it in the repo?

I'd normally do it myself, but it's finals week and I don't have a ton of time right now.

@alichtman alichtman added the bug Something isn't working label Dec 14, 2018
@alichtman alichtman changed the title No module named git error after installing on macOS gitpython not installed automatically when installing with pip Dec 14, 2018
@alichtman alichtman changed the title gitpython not installed automatically when installing with pip gitpython Not Installed Automatically w/ setup.py Dec 14, 2018
@AlexanderProd
Copy link
Contributor Author

AlexanderProd commented Dec 14, 2018

Thanks this fixed it and I've opened a PR including the changes.

@alichtman
Copy link
Owner

Awesome, thanks man.

alichtman pushed a commit that referenced this issue Dec 14, 2018
this fixes bug #200 where gitpython is not automatically installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants