I'm trying to install a package from Github, using Pip, using the following syntax
pip install -e git+https://github.com/facebook/python-sdk.git#egg=FacebookSDK
and getting the error "cannot find command git". This Question has (unchecked) answers saying that Git needs to be installed on the system. However, this Answer states that "Git, Subversion, Bazaar and Mercurial are all supported" by Pip.
The Pip documentation also says it has "Native support for other version control systems (Git, Mercurial and Bazaar)".
So how do I install this package with Pip? I really don't want to install Git on my VPS. Or are there any non-Pip tools, for just pulling files from repositories (without doing a full Git install)?
Update - so I bit the bullet, and installed Git on my VPS. Pip still wasn't able to grab the package, but it was giving a different set of errors, so - progress. :) I finally did
git clone http://github.com/facebook/python-sdk.git
(note the http, not https), and manage to download the package, then just installed it manually.
If I'm not mistaken, you would need the git client to be install on your machine. In the event that you don't have git installed, try this:
pip install https://github.com/facebook/python-sdk/zipball/master
or
pip install https://github.com/facebook/python-sdk/tarball/master
You need to install the git-core, since the git:// protocol isn't associated with anything.
sudo apt-get install git-core
For Windows or none git users:
I first download and unpack the file.
Then in the python directory going to \Scripts
Starting here the command prompt (shift + rigth-click)
pip install C:\Theano-master
*# replace Theano-master with the path to your directory of your package
This morning, when I run python pip to install a pcakge from git has problems.
pip install git+https://github.com/gumblex/zhconv.git#egg=zhconv
Firstly get error msg:
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
Try pip install git
ERROR: Could not find a version that satisfies the requirement git
ERROR: No matching distribution found for git
When I find this question,tried answers from #Mridang Agarwalla not work for first one; for second cmd, there was "time out" to git site.
But when trying answer from #Martijn van Wezel, it is very successfully. Thanks! #Martijn van Wezel
My trying is:
download the Zip file i need from Git page and extract it to a folder.
https://github.com/gumblex/zhconv
extract the ZIP to my local folder: D:\gitPackageforinstall\zhconv
Then success by below cmd.
pip install D:\gitPackageforinstall\zhconv
Hope this could be a reference to others as an update for 20210419
I'm learning about PostgreSQL and had to install the windows version. It was suggested to use git+, and I was running to the same issues that John C was experiencing.
Martijn above recommended unpacking and downloading. That is also what the creators of win-psycopg suggested. So I thought I'd share their method for installing into a Virtual Environment.
Thank you stickpeople:
http://www.stickpeople.com/projects/python/win-psycopg/
To install into a virtual env:
Related
Python 3.10 has a problem with disutils and setuptools>=58 in that wxPython will not run in conjunction with packages Gooey/DEAP/NEMO. I have been told there is a wxPython wheel which gets round those problems
https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2
but i cannot get the command syntax to work for some relationship between:
"git+", #egg", "wxPython"
I tried
pip install -e git+https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl#egg=wxPython
and got
pip install -e git+https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl#egg=wxPython
Obtaining wxPython from git+https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl#egg=wxPython
Cloning https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl to c:\users\gerald\src\wxpython
Running command git clone --filter=blob:none --quiet https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl 'C:\Users\Gerald\src\wxpython'
fatal: https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl/info/refs not valid: is this a git repository?
What is the correct pip command for this case please.
A new release appeared: https://pypi.org/project/wxPython/4.2.0/ . Binary wheels for w64 available for Python 3.7-3.10.
Syntax pip install git+https://URL is used to install from sources from a Git repository — clone, cd, build wheel, install. The link https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl is a direct link to a wheel, it's not a Git repository (GitHub is bigger than just a hosting for reposotories, it has bug tracker, project management, hosting for release artifacts, etc.) so you shouldn't use git+https:// syntax.
Try
pip install https://github.com/oleksis/youtube-dl-gui/releases/tag/v1.8.2/wxPython-4.1.2a1-cp310-cp310-win_amd64.whl
The wheel is valid for 64-bit Python version 3.10 on Windows. Check if your Python is the one.
I am trying to update mod_wsgi, and there is a issue between cryptacular and crypt.h, which is raising an error during installing mod_wsgi. Thankfully, the owner of cryptacular made a workaround. The version with the workaround is not the version on its dowload page or I can install with:
pip install cryptacular
So, I want to specify where pip is going to get cryptacular. The address for SSh is
ssh://hg#bitbucket.org/dholth/cryptacular
And, the commit name is cb96fb3. I tried
pip install hg+ssh://hg#bitbucket.org/dholth/cryptacular.git#cb96fb3
and I get an error message:
Error [Errno 2] No such file or directory: 'hg': 'hg' while executing command hg clone --noupdate -q ssh://hg#bitbucket.org/dholth/cryptacular.git /tmp/pip-req-build-xf6ubrkd
Cannot find command 'hg' - do you have 'hg' installed and in your PATH?
Admittedly, I do not have a hg installation. What to do? Which pages should I read??
Mercurial does not currently support Python 3.6, so I could not install it. I found a workaround by downloading tar.gz and install it with Pip.
Files of a project's particular commit on Bitbucket is located on:
https://bitbucket.org/<username>/<project name>/get/<commit name>.tar.gz
So, if you want to get it via terminal you do:
wget "https://bitbucket.org/<username>/<project name>/get/<commit name>.tar.gz"
Then, you unpack the tar.gz and install the package by Pip by:
pip install pathtothefile/<commit name>.tar.gz
You'll need to install hg, according to the instructions for your specific operating system: https://www.mercurial-scm.org/
The SSH URL there also should not include .git because that repository isn't in Git.
I am trying to install a python package that is available on github, but am unsure how to do so. This is the package: https://github.com/Jefferson-Henrique/GetOldTweets-python.
Could someone please provide me clear and step-by-step instructions on how to do this installation? None of the current answers are clear enough for me. I have tried the following command prompt command, but it is not working. I have git installed.
pip install git+https://github.com/Jefferson-Henrique/GetOldTweets-python.git
Error:
Cloning https://github.com/Jefferson-Henrique/GetOldTweets-python.git to c:\users\haris\appdata\local\temp\pip-ocsu8r-build
Error [Error 2] The system cannot find the file specified while executing command git clone -q https://github.com/Jefferson-Henrique/GetOldTweets-python.git c:\users\haris\appdata\local\temp\pip-ocsu8r-build
Cannot find command 'git'
git isn't installed via pip. It's a regular package that you'll want to install by doing apt install git, most likely as root.
You’ll need to install the package outside of pip since it’s not a python package. Conda install will work if you have anaconda or miniconda , or apt get install if you’re on a Linux system. Once you have git, run got clone package_name after navigating to the desired directory and you should be good to go.
I've been trying out the examples from the IMDBPY website. They don't work. As a fix someone said "you have to install the repository version, without using easy_install or pip, until we've packaged a newer version."
I'm very new to Python. I'm not even sure what the repository version is, let alone how to install it. Could someone please explain? If it matters, I'm using Python 2.7.
"Someone" may have misled you slightly by saying:
... without using easy_install or pip
You may still use pip when installing the repository version. They probably meant to say that you can not install the current version from PyPI yet.
In your shell:
$ git clone https://github.com/alberanid/imdbpy.git
Then cd into the imdbpy directory (the directory where you have the setup.py file contained). Optionally create/activate a virtual environment, and then:
$ pip install .
Repository version means you will need to checkout their repository on Github or other Subversion system they are hosting the code on. For git, that means cloning the repository to your local machine.
Like so: git clone https://github.com/alberanid/imdbpy
I have scikit-learn 0.16.1 installed on Ubuntu 14.04 and am working through the tutorial. SKL was installed with all default configuration. The tutorial states
The source of this tutorial can be found within your scikit-learn folder:
scikit-learn/doc/tutorial/text_analytics/
I've used find on my entire drive and there is no "tutorial" folder. Not anywhere. Anybody know where these files are really installed?
Finding the package contents
Where the packages are installed depends on how you installed scikit-learn
If you used Ubuntu's package system via
sudo apt-get install python-sklearn python-sklearn-doc
(you often need the doc package to get the accompanying documentation), then the tutorial is simply missing. The doc/-folder it is not contained in the python-sklearn-doc-package. See the bug report.
You can find out the contents of the package via
dpkg-query --listfiles python-sklearn-doc
If you used the Python Package Index to install it via
pip install --user --install-option="--prefix=" -U scikit-learn
, then the installation should be at $HOME/.local/lib/python2.7/site-packages/sklearn. (as also of pip show -f scikit-learn) But a
find . | grep -i tutorial
did not find any tutorial/-folder.
If you installed it from source, consider reinstalling via pip, as the warning states that
Warning
Packages installed with the python setup.py install command cannot be
uninstalled nor upgraded by pip later. To properly uninstall
scikit-learn in that case it is necessary to delete the sklearn folder
from your Python site-packages directory.
Solution
A solution would be to use the source. Either download the master file or do it via git:
git clone https://github.com/scikit-learn/scikit-learn.git
The git archive is more than 60 MiB, so you might want to prefer the master zip.