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.
Related
I am doing this project where i need to install a package called Twint.
I want to install this package and use it's commands in my VS Code.
What happends when i for example type this in my Windows CMD?
pip3 install --user --upgrade git+https://github.com/twintproject/twint.git#origin/master#egg=twint
Because i can't type this in my VS code terminal, where i usually install packages with pip.
It will return an error that says ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?''
Now if i run this in my Windows Command it seems that i can't directly import the package in VS code?
Can anyone help me out with this confusion, where does the files get stored and how do i create good habbits around installing packages?
Hope someone understands what im struggeling with here.
Best
It is often the case that computers have more than one version of python installed and that editors like VS code use a different version than pip uses on the command line. pip installs packages where the version of python it is linked to expects them to be, but VScode doesn't know to look there.
It sounds like you have git installed where pip installs things, so you can upgrade from the command line without issue, but there's no installation of git where VScode is looking, so there's nothing to upgrade.
You either need to find where pip installs things and add it to the $PATH VScode uses, or try running a variation of python -m pip install --user git (specifying a specific url, or other things, as needed) from within VScode, which will ensure the package gets installed in a place that VScode looks for packages.
Download and Install git in your windows from here:
https://git-scm.com/download/win
Then add its installation bin path to your windows's environment path. Then you will find the git command at the command prompt globally.
This may solve you problem.
I'm trying to install the package seen in these places: github, conda-forge, or pypi
So far I've tried a number of commands (NOTE: using windows, and anaconda prompt as administrator. You can see console output I posted here):
pip install git+git://github.com/dls-controls/cothread
conda install cothread
conda install -c conda-forge cothread
conda install -c conda-forge/label/cf202003 cothread
But in all cases, it's either PackagesNotFoundError: The following packages are not available from current channels: or fatal: unable to connect to github.com: github.com[0:140.82.113.3]: errno-Unknown error.
Now, I'm thinking I'll try a manual git clone, then go to the install folder and run pip install setup.py or python setup.py install. (something I think sounds good, but haven't done before) But I'm not sure where the proper place to clone it is. I'd like to add it to my anaconda environment named py310 (it's running 3.10.2). Does pip install automatically move a copy of it for me to the correct location? I want to do this right so that I keep some order to my configuration, and to help ensure that it's minimally confusing should I have to address some version issue in the future.
Thank you for any and all help!
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 installed SCons with pip install --egg scons. Now I want to uninstall it, but pip tells me that there is no package named scons, even though I can still call it from the command line. What is the proper way to remove it?
It happened to me as well. I think you tried pip install --egg scons since the normal way of installing gives you an error as discussed here.
Now to your problem, pip install --egg <package> spreads across installed files into the virtual-environment directory. I found this by running find -name *scons* in my virtual-environment directory:
./lib/scons-2.4.1
<lot of files>
./lib/scons-2.4.1/SCons/compat/_scons_io.pyc
./lib/python2.7/site-packages/scipy/lib/lapack/scons_support.py
./lib/python2.7/site-packages/scipy/lib/lapack/scons_support.pyc
./lib/python2.7/site-packages/scipy/lib/blas/scons_support.py
./lib/python2.7/site-packages/scipy/lib/blas/scons_support.pyc
./man/man1/scons-time.1
./man/man1/sconsign.1
./man/man1/scons.1
./bin/sconsign-2.4.1
./bin/scons-time-2.4.1
./bin/scons-2.4.1
./bin/sconsign
./bin/scons-time
./bin/scons
Deleting <virtualenv>/lib/scons-2.4.1, <virtualenv>/man/man1/scons* and <virtualenv>/bin/scons* should remove the installation.
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: