Problems installing twill on python 3 on windows. - python-3.x

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

Related

Rpy2 import rpy2.robjects as robjects fails

I've installed rpy2 through pip install rpy2. After this in a Jupyter notebook the import works fine:
import rpy2
print(rpy2.__version__)
which returns 3.1.0.
However when I type this import rpy2.robjects as robjects, I get the following error:
ValueError: The system "%s" is not supported.
Does someone know where this error comes from and how to solve it?
I had exactly the same problem.
I uninstalled the package and reinstalled it with conda (as I use Jupyter notebook through Anaconda):
conda install rpy2
Doing this it worked just fine.
The version installed was 2.9.4. There may be an issue with the version 3.1.0 I believe.
I have a similar problem. I had previously installed rpy2 2.9.5 withpip3 install rpy2 and it worked fine. However, today I tried updating it with pip3 install --upgrade rpy2 and got the following error:
Collecting rpy2
Using cached https://files.pythonhosted.org/packages/62/bc/d43df0d9e96a38985a97d1cbdb5722e10cd8fa0da45686972f0b8fd18a67/rpy2-3.2.4.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-irk23ljv/rpy2/setup.py", line 21, in <module>
from rpy2 import situation
File "/tmp/pip-build-irk23ljv/rpy2/rpy2/situation.py", line 98
raise ValueError(f'The system {system} is currently not supported.')
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-irk23ljv/rpy2/
I can't just stick to the older version because what I'm actually trying to do is to install another Python package that has rpy2 listed as a dependency. The install fails with the same error message.
Any update on the subject?
Edit
It looks like this might be a compatibility issue with Python 3.5 -- see https://bitbucket.org/rpy2/rpy2/issues/580/installing-rpy2-on-travis-with-pip. I've just opened an issue here: https://github.com/rpy2/rpy2/issues/356

Command "python setup.py egg_info" failed with error code 1 when installing 'pattern

Am trying to install pattern on python 3.6 with the command prompt using:
pip3 install pattern
But am getting this error :
C:\WINDOWS\system32>pip3 install pattern
Collecting pattern
Using cached pattern-2.6.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\HP\AppData\Local\Temp\pip-build-u_5lhmfa\pattern\setup.py", line 40
print n
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int n)?
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\HP\AppData\Local\Temp\pip-build-u_5lhmfa\pattern\
By the way I have Python 2.7 installed as well and when I installed with pip2 install pattern, it perfectly installed.
The problem is with python 3.6. How can I fix this?
Pattern-2.6 at PyPI seems to be rather old (last updated in 2014). They require Python 2.5+. I think the code is Python2-only, you cannot use it with Python 3.
Pattern3 seems to be the package for Python 3:
pip install pattern3
I don't know how but this really worked for me:
Running command prompt as an administrator then :
pip3 install git+https://github.com/clips/pattern#development
This install pattern as more packages.
Am posting this in case it would help anyone
More details :["pattern" package for python 3.6 Anaconda ]
Python3 support is as discussed in this issue: https://github.com/clips/pattern
From pip install from git repo branch
pip install -U https://github.com/clips/pattern/archive/development.zip

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. :-)

Error: "To build a Debian Package you must install stdeb (pip install std eb)" when installing dpkt (Python 3.5.2)

I'm trying to install dpkt package using pip (Python 3.5.2):
pip install dpkt
The installation fails giving this error:
Collecting dpkt
Using cached dpkt-1.8.8.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\ic21328\AppData\Local\Temp\pip-build-e0wstmu2\dpkt\setup.py
", line 26
print 'To build a Debian Package you must install stdeb (pip install std
eb)'
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ic21328\
AppData\Local\Temp\pip-build-e0wstmu2\dpkt\
I've successfully installed the stdeb package using pip, but the same error still occurs.
How can I install dpkt?
I got this same error. If you look more closely you can actually see that it is producing a syntax error on the dpkt package and not printing the error asking for you to install stdeb.
My solution was not ideal and involved using python 2.7 which worked fine for my particular use case.

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