I am trying to install the PDFMiner library, and after downloading the tar.gz file from
https://pypi.python.org/pypi/pdfminer/
Afterwards, it says to run the setup.py file, but after extracting the files using 7ZIP, for some weird reason there is no setup.py file. I have attached an image of how the extracted folder looks like.
To install PDFMiner, follow these step-
Install python 2.4 or newer. (Python 3.x is not supported.)
Download the PDFMiner source.
Unpack it. (ie. extract the archive)
Run setup.py to install: python setup.py install
That's it!
Related
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
I successfully ran the command:
pip install pymupdf
Successfully installed pymupdf-1.18.15
However, both
import fitz
and import pymupdf
both output an
ModuleNotFoundError.
Why is python giving me a ModuleNotFoundError?
According to PyMuPDF
Documentation
you need to download a wheel file that is specific to your platform
(e.g windows, mac, linux). The wheel files can be found on PyMuPDF
files.
Make sure to check the correct version of your python running on
your system python -V
Once downloaded place it at the root directory of your project.
Then run pip install PyMuPDF-<...>.whl replace PyMuPDF-<...>.whl
with the name of the wheel file you have downloaded in (1) above.
Now import fitz should be available in your module.
I'm new to Python. I'm familiar with pip... but how do I install something that pip doesn't know about?
Specifically, this is a Jupyter SQL Magics extension (GitHub link)
How do I install an extension "from scratch"?
Not everything is uploaded to pip and can be installed by it.
This seems to be a python script not extension.
Just download the code and use it as import to your script.
Here is how imports work
Python extensions, modules, library or programs (call them how you like) have setup.py script that makes them install-able. Or if its a program that requires library in order to use it it might have requirements.txt file.
This file is used by pip to install every dependency like so:
pip install -r requirements.txt
you can read more about setup.py here
Can you give more details what are you trying to accomplish?
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
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