Installing pysentiment in python - 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.

Related

pip install indexer error in Python 3.7 in Windows 10

I am trying to install indexer using Jupyter notebook in Python 3.7.
pip install indexer
I am getting the following error.
Collecting indexer
Using cached https://files.pythonhosted.org/packages/c7/2f/49ea001ccc81502fe790c6077ca0cf9c4dc98ce160e1b1225a8c881b53b1/indexer-0.6.2.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\manorama\AppData\Local\Temp\pip-install-vs0071ok\indexer\setup.py", line 107
except OSError, ex:
^
SyntaxError: invalid syntax
----------------------------------------
Note: you may need to restart the kernel to use updated packages.
Command "python setup.py egg_info" failed with error code 1 in C:\Users\manorama\AppData\Local\Temp\pip-install-vs0071ok\indexer\
I tried various solutions like
pip install --upgrade setuptools
pip install ez_setup
But nothing is working.
How can I install the indexer package?
If you're using the 'spellchecker' library, try installing using 'pip install pyspellchecker'.
It seems that the indexer package is not compatible with Python 3. In this case you have a number of options:
Find another package that provides similar functionality.
Use Python 2 for your application.
File a bug report and hope that someone will fix the issue, or try to fix the errors in the package yourself.
Oky,
close jupyter notebook and "run administrator anaconda terminal" and try again
or
pip3 install indexer
or
python3 -m pip install indexer

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 failed with error code 1 for pip install in python 3.6

I've recently done a clean install of Python 3.6 on my Windows 10 laptop.
I wish to install BeautifullSoup. When i try to use
python -m pip install BeautifulSoup
it returns the following:
C:\Users\mjpvanzuijlen\AppData\Local\Programs\Python\Python36>python -m pip install BeautifulSoup
Collecting BeautifulSoup
Using cached BeautifulSoup-3.2.1.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\MJPVAN~1\AppData\Local\Temp\pip-build-kopzhsyx\BeautifulSoup\setup.py", line 22
print "Unit tests have failed!"
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MJPVAN~1\AppData\Local\Temp\pip-build-kopzhsyx\BeautifulSoup\
I found others with similair problems with egg_info, but the solutions did not work for me. I have tried to upgrade pip, i downloaded setuptools32.3.2.1, i've upgraded setupttools but all to no avail.
It looks like you are trying to install the wrong package.
Try running: python -m pip install BeautifulSoup4
instead of: python -m pip install BeautifulSoup

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!

pip install PyQt IOError

I'm trying to install PyQt package with pip, but I get this error:
~$ pip install PyQt
Downloading/unpacking PyQt
Downloading PyQt-x11-gpl-4.8.3.tar.gz
(9.8Mb): 9.8Mb downloaded Running
setup.py egg_info for package PyQt
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory:
'/home/john/build/PyQt/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in
<module>
IOError: [Errno 2] No such file or
directory:
'/home/john/build/PyQt/setup.py
---------------------------------------- Command python setup.py egg_info
failed with error code 1 Storing
complete log in
/home/john/.pip/pip.log
That's because that file has a configure.py not a setup.py. configure.py generate a make file that you use to build pyqt against the qt lib you choose by passing --qmake option to configure.py, it has different options too. I suggest filing a bug with the pip maintainer.
If you're on Mac, you can use homebrew:
brew install pyqt
You can, alternatively, install PyQt4 using ActivePython's binary package manager.
$ pypm install pyqt4
The following packages will be installed into "~/.local" (2.7):
pyqt4-4.8.3.0
Hit: [pypm-free.activestate.com] pyqt4 4.8.3.0
Installing pyqt4-4.8.3.0
$
So long as you already have PyPM, no compilation required.
Sharing my setup procedure:
create virtual environment on your project folder and activate:
python3 -m venv venv
source venv/bin/activate
use pip to install PyQt5 (Note: specify the version especially on Centos7)
pip3 install pyqt5==5.14
you can pip install the directory of the downloaded version of pyqt after you download it ..google for your desired version

Categories