Need to install pip on computer without internet - python

I'm trying to download ultimately numpy and scipy on a computer running python 2.7 and that cannot connect to the internet. I've have the whl files for both of those on my computer but need to install them with pip which I also don't have. I've tried downloading the whl files for both pip and setuptools along with get-pip.py, and running python get-pip.py --no-index --findlinks=. but am now getting the error that it can't find a version that satisfies the requirement setuptools. It appeared to load the pip whl file fine but pip still isn't installed. Any suggestions for how to get setuptools to match the requirement, or a simpler way to do this all together?

setuptools dropped support for Python 2 at version 45.0. So you need to download version 44.

Related

How to get .whl file, if a library is already installed?

I have a python library installed on my pc. I did it with pip install. Is it possible to create .whl file of that library with Python code?
I need it, because i don't have access to internet on that pc currently.
If I were you I would try some variant of python -m pip wheel --no-index --no-deps NameOfLibrary.
Otherwise maybe the wheel is already in one of pip's caches (build cache or download cache). You can find their location with python -m pip cache info and go from there.

problem with install pySFML pip install pySFML windows python 3.9, 3.7

I try to install
(env_py) PS D:\github\env_py\Scripts> pip install pySFML
After that I have:
ERROR: Could not find a version that satisfies the requirement pySFML (from versions: none)
ERROR: No matching distribution found for pySFML
I am using python 3.9 and 3.7 on windows
And there is the same problem
THANKS!
The package name seems to be sfml, not pySFML.
Try
pip install sfml
pip install pySFML doesnot work anymore. The best way is to download the wheel from the below link and install it through wheel file
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pysfml
To install the wheel file just go to the directory where you have downloaded the file and then just do
pip install xyz.wheel
Another way, on linux
sudo aptitude install python3-sfml
It is work
I can
import sfml
but on windows I still can not install
https://www.sfml-dev.org/download/bindings.php
Extract the archive, and copy the files to your installation of Python. If you don't know where it's located, by default it should be "C:\Python26" on Windows or "/usr/lib/python2.6" on Linux.
Once the files are properly installed, you're ready to use PySFML.amd following command
python setup.py build

Install python packages offline on server

I want to install some packages on the server which does not access to internet. so I have to take packages and send them to the server. But I do not know how can I install them.
Download all the packages you need and send them to the server where you need to install them. It doesn't matter if they have *whl or *tar.gz extension. Then install them one by one using pip:
pip install path/to/package
or:
python -m pip install path/to/package
The second option is useful if you have multiple interpreters on the server (e.g. python2 and python3 or multiple versions of either of them). In such case replace python with the one you want to use, e.g:
python3 -m pip install path/to/package
If you have a lot of packages, you can list them in a requirement file as you would normally do when you have access to the internet. Then instead of putting the names of the packages into the file, put the paths to the packages (one path per line). When you have the file, install all packages by typing:
python -m pip install -r requirements.txt
In the requirements file you can also mix between different types of the packages (*whl and *tar.gz). The only thing to take care about is to download the correct versions of the packages you need for the platform you have (64bit packages for 64bit platform etc.).
You can find more information regarding pip install in its documentation.
You can either download the packages from the website and run python setup.py install. Or you can run a pip install on a local dir, such as :
pip install path/to/tar/ball
https://pip.pypa.io/en/stable/reference/pip_install/#usage
Download the wheel packages from https://www.lfd.uci.edu/~gohlke/pythonlibs/ . You may install the .whl packages by pip install (package.whl) , refer installing wheels using pip for more.
Download the package from website and extract the tar ball.
run python setup.py install

install Pyaudio - whl

I tried to install PyAudio on Windows 7 64bit.
Installing it with pip throws dependency errors which end up in the question how to satisfy those.
So i tried to install it with wheel, the suggestion was to just use pip install:
D:\Programming\Kivy>dir
...
27.03.2015 08:11 113.556 PyAudio.whl
D:\Programming\Kivy>pip install PyAudio.whl
Downloading/unpacking PyAudio.whl
Could not find any downloads that satisfy the requirement PyAudio.whl
No distributions at all found for PyAudio.whl
Storing complete log in C:\Users\WindowsPro\AppData\Roaming\pip\pip.log
Any suggestion how to install pyaudio?
What version of pip do you have? Show the output pip -V. It might be necessary to have a current pip version 6 to install the whl. If this is not the case do pip install --upgrade pip (it might be necessary to start the console with admin rights).
Did you download the library from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio? I just installed this version with pip and it works.
As an alternative you can download the installer exe from http://people.csail.mit.edu/hubert/pyaudio/#downloads and install it like a regular program.
If you cant donwload it by pip install pyaudio you can download it from here.
When you found PyAudio, find the version of your Python (ex. 3.7.2 32bit).
DOWNLOAD THE RIGHT VERSION. Once you found the .whl of your python version, download it. Install it by opening cmd, going to the folder that you save it and write pip install "pyaudio_whl_file.whl"
And that's it

pip could not install asyncmongo

I'm very new in Python and need to install asyncmongo package for my environment. But when I
excuting pip install asyncmongo it fails with the following error.
C:\git\project>pip install asyncmongo
Downloading/unpacking asyncmongo
Could not find any downloads that satisfy the requirement asyncmongo
Some externally hosted files were ignored (use --allow-external asyncmongo to allow).
Cleaning up...
No distributions at all found for asyncmongo
Storing debug log for failure in C:\Users\Name\pip\pip.log
What I'm doing wrong?
I had the same issue just now (guessing that the library you're trying to install doesn't have a distribution up on the repository which pip is using). Instead, install the easy_install utility and do:
easy_install asyncmongo
Also, as a side note, I'd recommend using virtualenv and virtualenvwrapper which comes with pip/easy_install.
They segregate your python installs and it is basically like using a python install for every project you work on instead of sharing it globally. It includes both pip and easy_install which is useful because when I can't find something with pip or if the pip install fails, I'm usually able to find it with easy_install.
I found the solution. The problem was caused because of asyncmongo 1.2.2 sources was hasted on the amazon file server, so in that case pip should be invoked with additional flags (--allow-external packagename and --allow-unverified packagename) so to install it properly follwing command should be executed:
pip install --allow-external asyncmongo --allow-unverified asyncmongo asyncmongo
You are on Windows platform and pip is not as great for Windows as for Linux or Mac. easy_install has some some advantages on Windows, such as installing a precompiled .exe binary.
On a different note, you may consider using motor instead of asyncmongo. It is newer and looks more elegant.

Categories

Resources