I want to install ZhuSuan a library for bayesian deep learning.The documentation says that:
ZhuSuan is still under development. Before the first stable release (1.0), please clone the GitHub repository and run:
pip install .
So I copied the link and run:
pip install https://github.com/thu-ml/zhusuan.git
However, I can't install it and during downloading I get an error:
can't unpack the file
You are trying to install a GitHub repository as a pip package, it will not work. You must clone the GitHub repository first (using SourceTree or any other tool).
Once you have cloned it (that means you downloaded it to your computer, using Git), go to that directory in your computer and run pip install . from that directory.
Related
What is the main difference in installing a python package by pip install and python setup.py install using the file from GitHub repository?
From what I understand right now, I kinda have the feeling that using the second option you will install the repo in some sort of developer mode where you can do changes by directly operating in the files cloned by git repo. Is this correct? I would like to find out a proper explanation of this.
I am trying to install tensorflow on a machine with no internet access: the machine has Windows 7 and Python 3.6 Anaconda.
I tried different approaches but non of them worked.
This what i did so far:
install anaconda with python 3.6
pip install tensorflow tensorflow-1.3.0-cp36-cp36m-win_and64.whl
But when I try to import tensorflow i get the following error:
ModuleNotFoundError: No module name google
I have read that I should install protobuf-3.6.tar.gz but I get the error :register_loader_type...
So I installed setuptools-3.6-py2.py3-none-any.whl
and I still get the same error
So my question is: is there any way to install tensorflow on a offline computer or there is something that I did wrong?
NOTE: I am admin on this offline machine
python3 -m pip download tensorflow on a machine with internet with the same OS. You will download all the needed packages to the current directory. Move the files onto a USB, mount the USB on the device without internet, and then do python3 -m pip install --no-index --find-links . tensorflow in the directory with the copied .whl files.
create anaconda conda virtul environment in some internet available system and install necessary package for your project and copy virtual environment to you system. put inside anaconda env, it works
Requirements :- Bazel Installation, python >=2.7 and numpy.
You can use link. Installtion steps are given. I am explaining in more briefly:-
clone repo:-
git clone https://github.com/amutu/tensorflow-offline.git
Download tensorflow and tensorflow third party.(Note:-you have to download compatible version of tensorflow with tensorflow third party.)
unzip them. In terminal run:-
tf=/path/to/tensorflow/directory and tp=/path/to/tensorflow/third/party/directory.(Note:- you can check path typing $tf and $tp on terminal.)
Example:- tp=/home/ai/Documents/vineet/test/tensorflow_third_party-1.2.1
tf=/home/ai/Documents/vineet/test/tensorflow-1.2.1
Run:-
cd tensorflow-offline
In tensorlfow offline run:-
./fix_offline_build.sh $tf $tp.(Note: you may also need to download tensorflow-port donwload it from here in tensorflow-port directory)
Configure tensorflow using:- cd $tf && ./configure
Build it using :- bazel --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures and
bazel-bin/tensorflow/tools/pip_package/build_pip_package
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.
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: