How to install pysqlite for python3.4.2 - linux

i use kali linux and i need sqlite3 driver for python3.4.2 i tried
the pysqlite install, but get an erorr. pls help me how to correct the
erorr thanks in advance
root#thinkpad:~# python --version
Python 3.4.2
root#thinkpad:~# pip --version
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)
root#thinkpad:~# pip install pysqlite
Downloading/unpacking pysqlite
Downloading pysqlite-2.6.3.tar.gz (76kB): 76kB downloaded
Running setup.py (path:/tmp/pip_build_root/pysqlite/setup.py) egg_info for package pysqlite
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/pysqlite/setup.py", line 85
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
^
SyntaxError: Missing parentheses in call to 'print'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/pysqlite/setup.py", line 85
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pysqlite
Storing debug log for failure in /root/.pip/pip.log

Related

Installing egg through pip

I can successfully install egg for morfeusz2 through
python -m easy_install http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg
However, all other dependencies I define through requirements.txt. I would like all of them to be defined in a consistent way. morfeusz2 is not present in any PyPI repo. How can I define dependencies for my project in a consistent way?
For instance, I have tried to define the following requirements.txt file:
django
pint
http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg
However, when running pip install -r requirements.txt it fails with:
(mealplanner) D:\Projects-intellij\djangoproject\mealplanner>pip install -r requirementx.txt
Collecting http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg (from -r requirementx.txt (line 3))
Downloading http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg (7.7MB)
100% |████████████████████████████████| 7.7MB 11.4MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\oem\virtualenv\mealplanner\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\OEM\\AppData\\Local\\Temp\\pip-req-build-xucfpk6m\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\OEM\AppData\Local\Temp\pip-req-build-xucfpk6m\
How do I install egg with pip install?

Problems installing twill on python 3 on windows.

I'm trying to use pip to install twill. I do the following.
C:\Users\mjpvanzuijlen\Python\python3.exe -m pip install twill
Which gives me the following result:
Collecting twill
Using cached https://files.pythonhosted.org/packages/2f/7e/ce3e6d72efe66530e131454f63c456b9f088435daaa99ae37b53ceafd32b/twill-1.8.0.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-install-h1xg__n6\twill\setup.py", line 6
print '(WARNING: importing distutils, not setuptools!)'
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MJPVAN~1\AppData\Local\Temp\pip-install-h1xg__n6\twill\
I found some github posts saying that this might be caused by setupttools, and upgrading it should fix it. I tried this, but it didn't work.
I'm not quite sure what's going wrong, but the print statement appears to be for python2? Could it be that python3 is running a pip version running python2? I'm clueless.
There is a different pip for python version3
python3.exe -m pip install twill3
Try this

scikits.statsmodels can not be installed with pip python 3.5

The official documentation https://scikits.appspot.com/statsmodels says that "scikits.statsmodels has been ported and tested for Python 3.2." but I get:
$ pip install scikits.statsmodels
Collecting scikits.statsmodels
Using cached scikits.statsmodels-0.3.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-dbu7u2oo/scikits.statsmodels/setup.py", line 96
print "debug import success GIT_REVISION", GIT_REVISION
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-dbu7u2oo/scikits.statsmodels/
How can I fix this?
As the PyPI page for scikits.statsmodels says:
The name of scikits.statsmodels has been changed to statsmodels, the new version is at http://pypi.python.org/pypi/statsmodels
So try
pip install statsmodels
FWIW I use statsmodels regularly in 3.6, so I'm pretty optimistic it'll work. :-)

Creating new virtualenv with python3.4

I'm getting the following error when trying to set up a new virtualenv with python3.4 (I'm running this command: virtualenv –p /usr/bin/python /tmp/djangodev):
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site- packages/pkg_resources.py", line 2697, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 669, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 576, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (virtualenv 1.11.6 (/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages),
Requirement.parse('virtualenv==1.7.2'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 2701, in <module>
parse_requirements(__requires__), Environment()
File "/System/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pkg_resources.py", line 572, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.7.2
I first downloaded virtualenv1.7.2 and after getting this error updated it by running: pip install virtualenv. Here is the successful installation message from this:
Downloading/unpacking virtualenv
Downloading virtualenv-1.11.6-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded
Installing collected packages: virtualenv
Successfully installed virtualenv
Cleaning up...
Can someone please help me resolve the above error?
Thanks #MattDMo for cluing me in.
I indeed have multiple virtualenvs installed so I ran sudo pip uninstall virtualenv and then sudo pip install virtualenv and this resolved the above error.

Installing python-flask gives Error [python setup.py egg_info failed with error code 1]

I'm a beginner in python's framework 'flask', i was following this link for the installation and demo App(to create virtual environment).
I'm using python 3.3.2 and on windows platform
python virtualenv.py flask
the above command gets well executed and all the files are downloaded correctly but when i execute
pip install flask==0.9
it gives me the following error
Downloading/unpacking flask==0.9
Downloading Flask-0.9.tar.gz (481kB): 481kB downloaded
Running setup.py egg_info for package flask
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "D:\Technologies\flaskpython\flask\build\flask\setup.py", line 62
print "Audit requires PyFlakes installed in your system."
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "D:\Technologies\flaskpython\flask\build\flask\setup.py", line 62
print "Audit requires PyFlakes installed in your system."
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in D:\Technologies\fla
skpython\flask\build\flask
Storing complete log in C:\Users\wa\pip\pip.log
Please guide me to install it correctly
Any reason you want to install specifically version 0.9? Why not pip install flask, which will install the latest 0.10.1 and its dependencies for Python 3.3.x? I tried it and it worked fine in virtualenv, while installing version 0.9 gave me the same error than you.
HTH, Phil
You can always got to pypi and download packages manually.
https://pypi.python.org/pypi/Flask
And then put the flask folder into the C:\Python33\lib\site-packages.
The problem you have is that the installer is not made for python3.
This makes me think that they did not prepare flask for python 3 which makes me guess that if you install flask under Python 3 you will have more problems. But you can try and be lucky.

Resources