package 'preprocess' installing error using pip command - python

I am trying to install the package 'preprocess' from inside terminal of pyCharm IDE but it is showing the folloiwing error.
i tried this command
pip install preprocess
and I am getting following errors
Collecting preprocess
Using cached
https://files.pythonhosted.org/packages/05/f9/559841df6c91428a2024ce120d92 192844178e4b2ceec1da84ce18205380/pr
eprocess-1.1.0.zip
ERROR: Command errored out with exit status 1:
command: 'c:\users\majid\appdata\local\programs\python\python38- 32\python.exe' -c 'import sys, setuptools, tokenize; sy
s.argv[0] = '"'"'C:\\Users\\majid\\AppData\\Local\\Temp\\pip- install-rsxg10hs\\preprocess\\setup.py'"'"'; __file__='"'"'C:\\
Users\\majid\\AppData\\Local\\Temp\\pip-install- rsxg10hs\\preprocess\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open
)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg
_info --egg-base 'C:\Users\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\pip-egg-info'
cwd: C:\Users\majid\AppData\Local\Temp\pip-install- rsxg10hs\preprocess\
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\setup.py", line 28, in <module>
import preprocess
File "C:\Users\majid\AppData\Local\Temp\pip-install-rsxg10hs\preprocess\lib\preprocess.py", line 264
except Exception, ex:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

As the release history of the project preprocess shows, it's a very old project that hasn't had a release in over 10 years. It is very unlikely to be compatible with current versions of Python. The error output in the question seems to show the error message comes from trying to install the project for Python 3.8 and the error itself seems to show that it fails on code with the Python 2 syntax.
I would not recommend using this project at all. Alternatively you could try using it with a Python 2 version of the interpreter.

Related

Parsing PDF to CSV

I have a PDF which contains a table that I would like to get into Excel. I found pdftables (a Python library) which may be able to do the job but I am having a problem installing the library. I am running Python 3.7.4 with Anaconda. When I try to install using pip, I get an error. Can anyone either tell me how to install the library or suggest another way to parse the table?
pip install pdftables
Collecting pdftables
Using cached https://files.pythonhosted.org/packages/5a/68/c587103e6937acd2ac4f07538e8b09d76e75979ffe57ac7bc59f256a79d7/pdftables-0.0.4.tar.gz
Collecting pdfminer==20110515 (from pdftables)
Using cached https://files.pythonhosted.org/packages/ce/f8/512bcd1a116d0332ab9fab84c3771d4699216db1086e120d581535665c31/pdfminer-20110515.tar.gz
ERROR: Command errored out with exit status 1:
command: /Users/ihf/opt/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/setup.py'"'"'; file='"'"'/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/
Complete output (8 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/setup.py", line 3, in
from pdfminer import version
File "/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-_h1bkupj/pdfminer/pdfminer/init.py", line 4
if name == 'main': print version
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(version)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

Trying to install turtle in cmd (python)

after i write pip install turtle in cmd, this message in pressented to me.
anyone knows what to do??
C:\>pip install turtle
Collecting turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Bruger\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-qv3xb6xg\\turtle\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-qv3xb6xg\\turtle\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Bruger\AppData\Local\Temp\pip-pip-egg-info-2tmj1fl2'
cwd: C:\Users\Bruger\AppData\Local\Temp\pip-install-qv3xb6xg\turtle\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-qv3xb6xg\turtle\setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
You already have turtle installed. However, if you get un error while trying to import turtle library, you most likely named your python file "turtle" so the module thinks you're trying to import the file that you're on instead of the real turtle file. So if that is the case try changing the name and it should be good to go!
You don't need to install turtle, it's already built in, and so, pip can't install it.
Try installing the PythonTurtle package. You can do this like this:
pip install PythonTurtle

How to install Vizdoom python

I am new to programming, I am trying to install vizdoom on windows 10, python. Using the command:
pip install vizdoom
and keep getting this error, I have tried searching around, have spent hours but am not able to fix it.
Collecting vizdoom Using cached vizdoom-1.1.7.tar.gz (4.9 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe'
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-sqhbgmz4\\vizdoom\\setup.py'"'"';
__file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-sqhbgmz4\\vizdoom\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\USER\AppData\Local\Temp\pip-pip-egg-info-m7e2idad'
cwd: C:\Users\USER\AppData\Local\Temp\pip-install-sqhbgmz4\vizdoom\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Temp\pip-install-sqhbgmz4\vizdoom\setup.py", line 14, in <module>
raise RuntimeError("Building pip package on Windows is not currently available ...")
RuntimeError: Building pip package on Windows is not currently available ...
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
as a last resort, I hope to get some help from here.
Never mind, I switched to ubuntu.

Intalling python-midi package in Anaconda

I'm trying to install the following Python-Midi Package (GitHub link) inside an Anaconda envirorment using pip (it works fine, i've already used it for many packages) with the command pip install python-midi.
Unfortunately i keep getting the following error:
ERROR: Command errored out with exit status 1: command: 'C:\Users\Mattia\anaconda3\envs\trapgenerator\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mattia\\AppData\\Local\\Temp\\pip-install-3jtz232d\\python-midi\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mattia\\AppData\\Local\\Temp\\pip-install-3jtz232d\\python-midi\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Mattia\AppData\Local\Temp\pip-install-3jtz232d\python-midi\pip-egg-info' cwd: C:\Users\Mattia\AppData\Local\Temp\pip-install-3jtz232d\python-midi\ Complete output (6 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Mattia\AppData\Local\Temp\pip-install-3jtz232d\python-midi\setup.py", line 42 print "No sequencer available for '%s' platform." % platform ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("No sequencer available for '%s' platform." % platform)? ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
And i can't really figure out what is the problem. Anyone has any suggestions?
Unfortunately the mentioned python package is not compatible with Python 3, works only with Python 2

Unable to install ssl in my local system using pip install ssl

I'm very new to python and when i tried to install some lib it is giving me this issue. can you please help on what to do.
When trying to install ssl using pip command it is giving me the below error
"pip install ssl"
Collecting ssl
Using cached https://files.pythonhosted.org/packages/83/21/f469c9923235f8c36d5fd5334ed11e2681abad7e0032c5aba964dcaf9bbb/ssl-1.16.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\rajesh_navaneeth\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"'; __file__='"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
long story short, don't install that python package. It's deprecated (shouldn't be installed in Python 2.6 and newer) and your python already includes ssl package.
In general you shouldn't even be able to install it via pip, but I guess that it's so old that setup.py didn't support version restrictions in the same way it does now.

Categories