pip install setup.py missing when attemping install of pyodbc wheel file - python

i'm trying to update the pyodbc package from 4.0.16 to 4.0.22.
i dont have internet access on the machine i'm working on so downloaded the file and copied to across the network.
running
pip install S:\Temp\PMCD\pyodbc-4.0.22-py27hc56fc5f_0(1).tar.bz2
results in the following error:
Processing s:\temp\pmcd\pyodbc-4.0.22-py27hc56fc5f_0(1).tar.bz2
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'c:\\users\\adm_pa~2\\appdata\\local\\temp\\2\\pip-yf25bd-build\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\adm_pa~2\appdata\local\temp\2\pip-yf25bd-build\
setuptools has already been updated to latest(38.5.1) and pip as well (9.0.1)
i used pip to update setuptools and pip itself (via downloaded whl files), so i dont think pip is an issue.
i already managed to sucessfully upgrade pyodbc on my local machine from 16 to 22, so the whl file i have not sure whats going on.
Any ideas whats going on?
Could i manually unzip the package and place it directly in the site-packages? that didnt seem to do anything.

If your target machine does not have a direct Internet connection you can still install pyodbc by
using another machine to download the appropriate wheel (.whl) file from PyPI,
copying that file to your target machine (via LAN, SneakerNet, ...), and
using pip install <wheel_file_location>
For example,
pip install C:\__tmp\pyodbc-4.0.22-cp27-cp27m-win_amd64.whl
The naming convention for wheel files is described in PEP 491.
The 64-bit wheel files for Windows are tagged as "win_amd64" because that's what the Windows version of distutils reports as the platform:
>>> from distutils import util
>>> distutils.util.get_platform()
'win-amd64'

Related

Reportlab install: need Pillow. Pillow install: need zlib. Zlib install: file not found

Relevant details:
Windows 8
Python 2.7 and 3.7 installed. I'm trying to migrate from 2.7 to 3.7, starting by making sure I have every package I use installed for 3.7
IDE is PyCharm. I tried installing packages that way, but proxy blah blah connection issues blah blah, gave up on that rabbit hole
I am installing from CMD, where I also have a proxy issue, so I'm downloading packages and installing from there.
pip version 19.0.3
C:\Users\me\Downloads>py -3 -m pip install zlib-1.2.11.tar.gz
Processing c:\users\me\downloads\zlib-1.2.11.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python37\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\me\
\AppData\\Local\\Temp\\pip-req-build-itydqf_9\\setup.py'
Command "python setup.py egg_info" failed with error code 1 in C:\Users\me\AppData\Local\Temp\pip-req-build-itydqf_9\
I have tried installing zlib1211 as well.
I have tried 17 versions of Pillow. 4.0.0, 3.4.2 (succeeded but Reportlab requires 4.0 minimum), 6.1.0, and I've tried .whls and .eggs and such to no avail. I've been to dozens of pages looking to solve each issue I've come across, and I have no more things to try. zlib isn't even in pypi.
What else can I do?
zlib isn't a python package, you can't use pip to install it.
you can try this or use cygwin
I finally found a workable solution. As #Sobhan mentioned, I can't use pip to install zlib. However, once I installed zlib from his link, I still couldn't get Pillow to install, because the headers or libraries couldn't be found for my Pillow install.
#ash's answer here finally helped. I apparently needed to use the Pillow .exe to install Pillow instead of banging my head against the wall with pip for that, too. Reportlab then installed via pip without incident.

pip install FileNotFoundError: [Errno 2] No such file or directory:

I am trying to install behave-parallel using pip install. I have installed programmes previously using pip so I know my Python/script path is correct in my env variables. However I am seeing the following error
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\.....Temp\\pip-install-rjiorrn7\\behave-parallel\\setup.py'
how can I resolve this issue
C:\Users\.....>pip install behave-parallel
Collecting behave-parallel
Using cached https://files.pythonhosted.org/packages/05/9d/22f74dd77bc4fa85d391564a232c49b4e99cfdeac7bfdee8151ea4606632/behave-parallel-1.2.4a1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\.........\python\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\.........\\AppData\\Local\\Temp\\pip-install-7vgf8_mu\\behave-parallel\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\.........\AppData\Local\Temp\pip-install-7vgf8_mu\behave-parallel\
In my case with the same error, the solution was to do
pip3 install --upgrade pip
It was my pip3 that was in version 9.X were it's now in version 19.X
The package is simply broken, as it is missing the setup.py file.
$ tar tzvf behave-parallel-1.2.4a1.tar.gz | grep setup.py
$
You might be able to download the source from Github or wherever and package it yourself (python setup.py bdist_wheel), then install that wheel (pip install ../../dist/behave-parallel...whl).
There is a newer feature for building python packages (see also PEP 517 and PEP 518). A package can now be built without setup.py (with pyproject.toml), but older pip versions are not aware of this feature and raise the error shown in the question.
So if you have reason to believe that the library was packaged properly, try updating pip to something newer (version 19 or newer will probably work).
Here it seems caused by setup.py not being in the root of my project.
(it can't be in root because otherwise the unit test will "discover" setup.py and fail it because it's not a test)

egg_info error when installing python modules

I am new to Python and I am trying to install pypgen.
As explained one the webpage, I first installed "samtools" (via brew install samtools as recommended).
Trying to install pypgen
I tried the 4 ways suggested by the author to install pypgen
$pip3.6 install pypgen
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yv/n6rkh3sn5mn5qpsn87lvjw4m0000gp/T/pip-build-aQiBgg/pypgen/
$easy_install pypgen
Processing pypgen
error: Couldn't find a setup script in /Users/remi/Downloads/pypgen-0.2.1/pypgen
$pip3.6 install -e git+https://github.com/ngcrawford/pypgen.git
Could not detect requirement name, please specify one with #egg=
I downloaded "pypgen-0.2.1.tar.gz" from the pypgen website, uncompressed it, cd to the folder and did
$python setup.py install
Traceback (most recent call last):
File "setup.py", line 1, in <module>
import distribute_setup
ImportError: No module named distribute_setup
So, I did
$pip3.6 install distribute
but it did not solve the previous issue
Trying to Solve egg_info error
This egg_info error seems to be key. I tried to download this file and did
sudo python ez_setup.py
as recommended on this post but it did not solve the error messages above. I then tried
sudo pip3.6 install --upgrade setuptools
as recommended on this post but I keep receiving the same error messages when doing pip3.6 install pypgen
I am using Python 3.6 but I also have the version 2.7 installed. I tried everything with both versions (pip3.6 and pip2.7) and get the same errors. I am on MAC OS X 10.11.3

Syntax error when installing csc-pysparse

I am new to Python and I am trying to install recsys package.
http://ocelma.net/software/python-recsys/build/html/installation.html
For this i need to install some pre-requiste packages, so i have to run this using pip
pip install csc-pysparse networkx divisi2
But whenever i run this i get the following in logs
Collecting csc-pysparse
Using cached csc-pysparse-1.1.1.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\64\AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
setup.py", line 33
print 'setuptools module not found.'
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\i054564\
AppData\Local\Temp\pip-build-wn7_65_9\csc-pysparse\
I checked that setuptools exist in my python installation here
C:\Python34\lib\site-packages
I have ran everything from unstinalling setuptools to install it again, upgrade command, but it does not work.
Not able to figure out why setuptools is not found. Is it not found in the path of where pip resolves it from ?
cheers,
Saurav
The code triggering the error is Python 2-specific and is illegal in Python 3.
Apparently, csc-pysparse doesn't support Python 3 (its README only mentions 2.6) and looks abandoned (6 years since last commit).
Some guys out there suggest replacing it with SciPy.
The error is coming from the installation code of recsys package. In order to avoid this error, you need to install setuptools separately.
For debian machines, the below command will work.
sudo apt-get install python3-setuptools
For other machines, please checkout installation instructions at the link
Once setuptools package is installed, you can proceed with csc-pysparse installation.

pip wont install .WHL files

When I try to install any .WHL from gohike by typing into the cmd C:\Users\owner\Downloads>pip install TA_Lib-0.4.9-cp27-none-win_amd64.WHLI get this print out:
`Processing c:\users\owner\downloads\ta_lib-0.4.9-cp27-none-win_amd64.whl
Complete output from command python setup.py egg_info:
Traceback <most recent call last>:
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory:'c:\\users\\owner\\appdata\\lo
cal\\temp\\pip-9gwk2c-build\\setup.py'
-----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\owner\ap
pdata\local\temp\pip-9gwk2c-build\`
The part between pip- and -build inpip-9gwk2c-build is always different even on the same file.
I asked this Python 2.7.11 Pip 8.0.3 can't install gohike WHL of TA-Lib 0.4.9 a few days ago and decided to ask differently. Thanks to anyone who can help me!
You have an outdated pip which does not understand wheels. Wheels are not even supposed to have a setup.py inside.
Try upgrading pip with pip install --upgrade pip and then running the command again.
Well, I didn't fix pip but I found out that if I use 7zip to open/unpack the wheel file and drag drop the 2 folders in it into C:\Python27\Lib\site-packages that it works!

Categories