pip wont install .WHL files - python

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!

Related

Installing pysentiment in python

Getting error while installing pysentiment in python 3.7.1
Command used -
pip install pysentiment
Error
Collecting pysentiment
Using cachedhttps://files.pythonhosted.org/packages/3d/32/b9822555aeafd9......./pyt=sentiment-0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback(most recent call last):
File "(string)", line 1,(module)
install reg = [e.strip() for e in eopn(path_req).readlines()]
FileNotFoundError[Error 2] No such file or directory:'C:/Users/........pysentiments\requirements.txt
Working on Windows 8.1
This looks like an error in the .tar.gz on PyPi. The file seems to be missing from it. You should be able to install from github:
pip install git+https://github.com/hanzhichao2000/pysentiment
Download the pysentiment file from this Pysentiment and then you can use the command
pip install pysentiment-master.zip
This worked in my case.

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)

Error when installing scapy

Ok so i'm trying to install scapy for python3, but ive been having some issues
when I enter this command:
pip install scapy
This is the output:
Collecting scapy
Using cached scapy-2.3.3.tgz
In the tar file C:\Users\MYNAME~1\AppData\Local\Temp\pip-oao3meyq-
unpack\scapy-2.3.3.tgz the member scapy-2.3.3/README
is invalid: unable to resolve link inside archive
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MYNAME~1\AppData\Local\Temp\pip-build-
qjegdxw6\scapy\setup.py", line 36
os.chmod(fname, 0755)
^
SyntaxError: invalid token
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\MYNAME~1\AppData\Local\Temp\pip-build-qjegdxw6\s
capy\
So then I searched around and I tried using this:
pip3 install scapy-python3
But it just says that pip3 isnt a command, so im not sure what to do
Instead of pip3 use pip
pip install scapy-python3
It worked for me. pip3 is usually used if you have both python2 and python3 installed on your machine. It is uesd to distinguish between different pips in your system.
The pip3.exe will be in python3x/scripts/.
Check if there is a pip3.exe is available in your scripts folder.
If the above solution doesn't work for you then try giving the full path of correct pip.exe.

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.

Categories