How to install Python libraries on Windows without UAC? - python

So I downloaded the Python embedded files, and put it into %USERPROFILE%\bin\python to run Python files.
Then I downloaded setuptools files from PyPI and tried to install setuptools by using “Python setuptools install”, but it give me the “No module named ‘setuptools’” error.
Is there any way I can install Python libraries on Windows without UAC? Thanks.

I do it the following way:
Download the whl file from PyPi
Open powershell and change to the directory where the whl file is located.
Run pip install setuptools-<version-info>.whl

Related

How to install shapely (python package)

The instructions for Windows ask to download the installer from
http://www.lfd.uci.edu/~gohlke/pythonlibs/
The link for my version displays as "Shapely‑1.5.13‑cp27‑none‑win_amd64.whl".
However it is actually a zip file, which contains 2 folders, neither of which appear to contain a .whl file or an installer.
Note that the question is not about how to install a .whl file, but why I can't see a .whl file.
How do I install this?
The file is a .whl, you can install it by running
pip install ___.whl

Error installing from GitHub using pip on Windows

I am on a Windows machine and I want to install a Python module from GitHub using pip directly from IPython.
The simplest command that seems it should work is:
!pip install https://github.com/japerk/nltk-trainer.git
I have also tried:
!pip install https://github.com/japerk/nltk-trainer.git#egg=nltk-trainer
I've used variants including -vvv, etc.
However, I'm getting the following error. Why?
Cannot determine archive format of C:\Users\timo\AppData\Local\Temp\pip-build-183bwemw\nltk-trainer
go to the https://github.com/japerk/nltk-trainer and download the project zip file. extract the zip file and put it somewhere in your computer.
open command prompt in windows and go inside the folder that you extracted earlier(you must be in the folder that has setup.py file in it).
enter the following command: python setup.py install
python tries to install nltk-trainer . during installation some other dependency might be installed too. you need numpy and scipy to be installed. if any problem happened during installation of numpy or scipy try installing them manually first by using pip install numpy and pip install scipy
if you can't install numpy and scipy using pip command use the following link:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
this site has compiled version of these libraries ( and other libraries if you need to install them too) you can download .whl file that is based on your python version and os architecture and install them using pip install filename.whl command ( you need to be in the folder that your whl file is) for example for python3.4 and 64bit operating system you may download scipy‑0.16.0‑cp34‑none‑win_amd64.whl file.

How to install LXML Python 3.3 Windows 8 64 Bit

I think I'm too stupid for installing LXML Lib on my System.
Please can anyone help me with instructions for stupid people?
I found a lot of instruction, but they did not help me much.
I looked at LXML-Homepage
For installation I need pip 1.4.1? I downloaded it... But, how can I install it?
Unzip pip-1.4.1.tar.gz
Then I opened the setup.py with my Python Shell.
Run the modul:
Traceback (most recent call last):
File "C:\................\dist\pip-1.4.1\setup.py", line 5, in <module>
from setuptools import setup, find_packages
ImportError: No module named 'setuptools'
Ok.. now I thought I need setuptools...
Downloaded setuptools-1.4.1-py2.py3-none-any.whl
Unziped it.. run the easy_install.py with my python shell
SystemExit: error: No urls, filenames, or requirements specified
Same error if started in windows command console.
What should I do?
If you on Windows, why not to use binary packages with normal installers?
You can find them on this page: http://www.lfd.uci.edu/~gohlke/pythonlibs/
You can also use anaconda. Once you have it installed (http://continuum.io/downloads) you can just run conda install lxml to install lxml. It's also very useful for packages like numpy and scipy, which can sometimes be a pain to install on Windows.
These instructions are for Windows7 or Windows8 with Python3.3 specifically as the original poster requested. However, they should work for various versions as the releases of python and other respective prerequisites change/evolve:
Install Python3.3:
Download the last release of Python3.3 (currently 3.3.5) from the downloads page HERE
Direct link for Win32 MSI installer -> HERE
Direct link for Win64 MSI installer -> HERE
Simply run the MSI to install python. It will register itself in the registry, and appear in Add/REmove Programs.
NOTE: my instructions that follow assume that you choose to install python to the default path of C:\python33\ when asked during the Python Installation Wizard
Add the C:\python33\ and C:\python33\scripts folders to the system path by adding those directories to the PATH environment variable from the Control Panel > System > Advanced System Settings link (Advanced Tab) > Environmental Variables (Button).
Install OpenSSL:
Download Win32 OpenSSL page from HERE for your version of Windows and PC architecture
Download Visual C++ 2008 redistributables for your version of Windows and PC architecture
Download OpenSSL for your version of Windows and architecture (the regular version, not the light one)
Add the c:\openssl-win32\bin (or similar) directory to your PATH, the same way you added C:\python33 and C:\python33\scripts above.
Install Setuptools (get-pip.py should install Setuptools for you), but, just in case...
Download ez_setup.py HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python ez_setup.py
Install PIP
Download get-pip.py from HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python get-pip.py
Install LXML
Download LXML 3.3.3 from HERE for your version of Windows and PC architecture
Run the EXE file
Download lxml based on your version dependencies from here,
http://www.lfd.uci.edu/~gohlke/pythonlibs/djcobkfp/lxml-3.4.4-cp27-none-win32.whl # replace lxml version based on your dependencies..
http://www.lfd.uci.edu/~gohlke/pythonlibs/
and open your command prompt open lcoation Downloads or where file Downloaded in cmd..
that install using,
pip install lxml-3.4.4-cp34-none-win_amd64.whl # this is eg name may vary based on your python or lxml version.

How can I install a .egg Python package on Windows (attempt using easy_install not working)

I am trying to install a package named QSTK for a course that I am doing. The course points to an installation package for the 32 bit version, but I have 64 Python installed. I have found a .egg file listed on the Python packages index.
It seems to have an exe for 32 bit, but just the .egg for 64 bit. I downloaded the QSTK-0.2.6-py2.7.egg version and have been trying to install this unsucessfully so far.
Here is what I have tried:
Using easy install (from the C:\Python27\Lib\site-packages
directory):
Python easy_install -Z C:\Users\Prosserc\Downloads\QSTK-0.2.6-py2.7.egg
this has created a QSTK-0.2.6-py2.7.egg directory in my
site-packages directory which I can open and find files in. However,
I have tried to import QSTK from the python shell and get the usual
"No module named..." import error.
I looked for a setup.py file as I have used these to install
packages before, but could not find one.
I have also looked at this thread which gives details of
installing a .egg file without using easy install, but cannot figure
out what changes I would need to make to the script provided as this
is to install a specific package that I already have.
If anyone can help by explaining either how I can install this .egg file correctly or by providing a link to the QSTK modules for python 2.7 64 bit in another format this would be greatly appreciated.
I have managed to install the packages that QSTK is dependant on okay (numpy, scipy, matplotlib, pandas, python-dateutil and scikit-learn).
You should add -m before easy_install
for example:
python -m easy_install C:\Users\Prosserc\Downloads\QSTK-0.2.6-py2.7.egg
How about if you unpack the .egg (it's just a .zip in disguise), then cd into it and run python setup.py install? Will that run fine and will you then be able to import your module?
I'm saying this because if the .egg file does get put under site-packages as appropriate but you're still not able to import, this might be a problem in the code itself.
I have finally found another place to download this from with a package that works: https://pypi.python.org/pypi/QSTK/0.2.6 has a QSTK-0.2.6.tar.gz option to build it from the source code.
Unzipping this (then again once down to the .tar), I could find the setup.py file and install by going to the directory with the setup file and running:
python setup.py install
I tried copying the contents of the .egg folder in the path Lib\site-packages .
It worked and didn't throw any ModuleNotFoundError .
I found pip install qstk works perfectly for 64x 2.7 python at win 7

install pyquery on windows

I want to install pyquery on windows. But i cant run setup.py install on the command line. Do you have any hint?
I guess you don't have lxml or setuptools installed
setuptools
http://pypi.python.org/pypi/setuptools/0.6c11
lxml
http://pypi.python.org/pypi/lxml/2.2.2
Install them first and then try again, I just tried that, its working properly here.
I could not install lxml on windows with either pip or easy_install. Complained "Unable to find vcvarsall.bat"
Tried installing Cygwin and MinGW but that was taking way too long
found out from raidsan's answer about unofficial precompiled windows binaries
http://www.lfd.uci.edu/~gohlke/pythonlibs/
installed and works fine now
SIMPLE WORKING SOLUTION:
I download the tar file here pyquery-1.2.13.tar.gz (https://pypi.python.org/pypi/pyquery#downloads)
I extracted them a folder pyquery-1.2.13 then i pasted myscript.py to this folder pyquery-1.2.13 in my script i have these lines at the very top to include pyquery module and it works!
import pyquery (this file is in pyquery-1.2.13 folder)
from pyquery import *
Done.
I'm using miniconda on Windows and here is how I installed pyQuery :
Download python miniconda from http://conda.pydata.org/miniconda.html
(if you need many libraries at once, consider installing anadonda instead)
Then from the commandline prompt, run the following commands:
conda install lxml
conda install setuptools
Grab the lastest pyQuery source from https://codeload.github.com/gawel/pyquery/zip/master and unzip it to a directory.
Again from the commandline, go to this directory and run :
python setup.py install

Categories

Resources