Love Preet Singh
Love Preet Singh

Reputation: 51

Install github3.py module for python3.5

I want to install github3.py module on python 3.5 on kali linux.

How can I install that?

I have already tried in terminal

pip install github3.py

but it has installed python 2.7.

root@kali:~# conda install pip
bash: conda: command not found
root@kali:~# python --version
Python 2.7.11+
root@kali:~# pip install github3.py
Requirement already satisfied (use --upgrade to upgrade): github3.py in   /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade):     requests>=2.0    in /usr/lib/python2.7/dist-packages (from github3.py)
Requirement already satisfied (use --upgrade to upgrade): uritemplate.py>=0.2.0 in /usr/local/lib/python2.7/dist-packages (from github3.py)
root@kali:~# python3.5
Python 3.5.2 (default, Jul  5 2016, 11:33:36) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
 >>> 

I have installed Python3.5 as shown

Upvotes: 4

Views: 2304

Answers (2)

Love Preet Singh
Love Preet Singh

Reputation: 51

root@kali:~# git clone --depth=50 https://github.com/sigmavirus24/github3.py.git sigmavirus24/github3.py

We can use this to obtain the setup of github3.py and it get downloaded in root directory In root directory i obtain a folder named sigmavirus24 and then again another folder named Github3.py in that folder setup of Github3 Now enter the following command in the terminal

root@kali:~# ls
cryptology                                   ps3
Desktop                                      Public
Documents                                    __pycache__
Downloads                                    pycharm-community-2016.1.4
jesolem-PCV-376d597                          PycharmProjects
ll.py                                        sigmavirus24
root@kali:~# cd sigmavirus24
root@kali:~/sigmavirus24# ls
github3.py
root@kali:~/sigmavirus24# cd github3.py
root@kali:~/sigmavirus24/github3.py# ls
AUTHORS.rst           example-notebooks         LICENSE          setup.cfg
CODE_OF_CONDUCT.md    github3                   Makefile         setup.py
CONTRIBUTING.rst      HISTORY.rst               MANIFEST.in      tests
dev-requirements.txt  images                    README.rst       tox.ini
docs                  LATEST_VERSION_NOTES.rst  report_issue.py
root@kali:~/sigmavirus24/github3.py# python3.5 setup.py install
running install
Checking .pth file support in /usr/local/lib/python3.5/dist-packages/
/usr/bin/python3.5 -E -c pass
TEST PASSED: /usr/local/lib/python3.5/dist-packages/ appears to support     .pth files
running bdist_egg
running egg_info
creating github3.py.egg-info
writing github3.py.egg-info/PKG-INFO
writing dependency_links to github3.py.egg-info/dependency_links.txt
writing top-level names to github3.py.egg-info/top_level.txt
writing requirements to github3.py.egg-info/requires.txt
writing manifest file 'github3.py.egg-info/SOURCES.txt'
reading manifest file 'github3.py.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching '*.pyc'
no previously-included directories found matching 'docs/_build'
writing manifest file 'github3.py.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/github3
copying github3/null.py -> build/lib/github3
copying github3/orgs.py -> build/lib/github3
copying github3/decorators.py -> build/lib/github3
copying github3/events.py -> build/lib/github3
copying github3/models.py -> build/lib/github3
copying github3/exceptions.py -> build/lib/github3
copying github3/utils.py -> build/lib/github3
copying github3/pulls.py -> build/lib/github3
copying github3/github.py -> build/lib/github3
copying github3/api.py -> build/lib/github3
copying github3/__about__.py -> build/lib/github3
copying github3/users.py -> build/lib/github3
copying github3/git.py -> build/lib/github3
copying github3/licenses.py -> build/lib/github3
copying github3/session.py -> build/lib/github3
copying github3/auths.py -> build/lib/github3
copying github3/notifications.py -> build/lib/github3
copying github3/__init__.py -> build/lib/github3
copying github3/structs.py -> build/lib/github3
creating build/lib/github3/gists
copying github3/gists/gist.py -> build/lib/github3/gists
copying github3/gists/file.py -> build/lib/github3/gists
copying github3/gists/history.py -> build/lib/github3/gists
copying github3/gists/__init__.py -> build/lib/github3/gists
copying github3/gists/comment.py -> build/lib/github3/gists
creating build/lib/github3/repos
copying github3/repos/stats.py -> build/lib/github3/repos
copying github3/repos/status.py -> build/lib/github3/repos
copying github3/repos/pages.py -> build/lib/github3/repos
copying github3/repos/branch.py -> build/lib/github3/repos
copying github3/repos/comparison.py -> build/lib/github3/repos
copying github3/repos/repo.py -> build/lib/github3/repos
copying github3/repos/issue_import.py -> build/lib/github3/repos
copying github3/repos/tag.py -> build/lib/github3/repos
copying github3/repos/contents.py -> build/lib/github3/repos
copying github3/repos/hook.py -> build/lib/github3/repos
copying github3/repos/deployment.py -> build/lib/github3/repos
copying github3/repos/commit.py -> build/lib/github3/repos
copying github3/repos/release.py -> build/lib/github3/repos
copying github3/repos/__init__.py -> build/lib/github3/repos
copying github3/repos/comment.py -> build/lib/github3/repos
creating build/lib/github3/issues
copying github3/issues/label.py -> build/lib/github3/issues
copying github3/issues/issue.py -> build/lib/github3/issues
copying github3/issues/event.py -> build/lib/github3/issues
copying github3/issues/milestone.py -> build/lib/github3/issues
copying github3/issues/__init__.py -> build/lib/github3/issues
copying github3/issues/comment.py -> build/lib/github3/issues
creating build/lib/github3/search
copying github3/search/repository.py -> build/lib/github3/search
copying github3/search/issue.py -> build/lib/github3/search
copying github3/search/user.py -> build/lib/github3/search
copying github3/search/code.py -> build/lib/github3/search
copying github3/search/__init__.py -> build/lib/github3/search
creating build/bdist.linux-i686
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/github3
copying build/lib/github3/null.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/orgs.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/decorators.py -> build/bdist.linux-i686/egg  /github3
creating build/bdist.linux-i686/egg/github3/gists
copying build/lib/github3/gists/gist.py -> build/bdist.linux-i686/egg/github3/gists
copying build/lib/github3/gists/file.py -> build/bdist.linux-i686/egg/github3/gists
copying build/lib/github3/gists/history.py -> build/bdist.linux-i686/egg/github3/gists
copying build/lib/github3/gists/__init__.py -> build/bdist.linux-i686/egg/github3/gists
copying build/lib/github3/gists/comment.py -> build/bdist.linux-i686/egg/github3/gists
copying build/lib/github3/events.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/models.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/exceptions.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/utils.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/pulls.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/github.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/api.py -> build/bdist.linux-i686/egg/github3
copying build/lib/github3/__about__.py -> build/bdist.linux-i686/egg/github3
creating build/bdist.linux-i686/egg/github3/repos
copying build/lib/github3/repos/stats.py -> build/bdist.linux-i686/egg/github3/repos
Moving uritemplate.py-0.3.0-py3.5.egg to /usr/local/lib/python3.5/dist-packages
Adding uritemplate.py 0.3.0 to easy-install.pth file

Installed /usr/local/lib/python3.5/dist-packages/uritemplate.py-0.3.0-  py3.5.egg
Searching for requests==2.9.1
Best match: requests 2.9.1
Adding requests 2.9.1 to easy-install.pth file

Using /usr/lib/python3/dist-packages
root@kali:~/Downloads# 

Now close the terminal and again run the terminal and now type the following command to insure that the github3 is properly istalled

root@kali:~# python3.5
Python 3.5.2 (default, Jul  5 2016, 11:33:36) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import github3
>>> 

Upvotes: 0

Jossie Calderon
Jossie Calderon

Reputation: 1415

python -m pip install github3.py should work. It works on my Windows 10 computer. We obtain similar output:

$ python -m pip install github3.py
Collecting github3.py
  Downloading github3.py-0.9.5-py2.py3-none-any.whl (109kB)
    100% |################################| 112kB 159kB/s
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in c:\anaconda3\lib\site-packages (from github3.
py)
Collecting uritemplate.py>=0.2.0 (from github3.py)
  Downloading uritemplate.py-0.3.0.tar.gz
Building wheels for collected packages: uritemplate.py
  Running setup.py bdist_wheel for uritemplate.py ... done
  Stored in directory: C:\Users\Forest\AppData\Local\pip\Cache\wheels\f0\28\64\52c28cc4428d1c79eb7e923cade677f5e63ae1d2f
d5d274e19
Successfully built uritemplate.py
Installing collected packages: uritemplate.py, github3.py
Successfully installed github3.py-0.9.5 uritemplate.py-0.3.0

We get something like Building wheels ...

If you try to run the command again we get:

$ python -m pip install github3.py
Requirement already satisfied (use --upgrade to upgrade): github3.py in c:\anaconda3\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in c:\anaconda3\lib\site-packages (from github3.
py)
Requirement already satisfied (use --upgrade to upgrade): uritemplate.py>=0.2.0 in c:\anaconda3\lib\site-packages (from
github3.py)

Upvotes: 1

Related Questions