Pyparsing for Python 3 - python-2.7

I have recently installed PyParsing, but I saw that it's only available on Python 2, but I use Python 3.
I just don't want to learn Python 2, so is there a way to configure/port PyParsing to Python 3?

My suggestion would be to learn python-2.x. It isn't exactly learning, since you already know the language, you just need to familiarize yourself with the syntax, for which this link and this link help.

Related

Sublime text 2 can not find any python module

I am leaning programming now and get stuck in the very beginning.
I have sublime text 2 installed on my Mac, and I type some python code in and it runs. However, when I start to import module like pandas/matplotlib, it can not find those modules. Certainly I have used pip to install them.
So what is the solution please?
Does Your code work with those modules when You use a different editor?
If it doesn't, Check if the modules You need are indeed installed. You can do this either by using the python prompt:
python
>>> help("modules")
>>> exit()
or using pip:
pip freeze
(sorry for posting this as an answer, but I'm currently not able to post comments)

How to list module in opencv python

I search in google and still no found any that work.
I want to compare between opencv 2.4.13 and opencv 3.1 and opencv 3.2 for python
I know that i can check module list in opencv docs. But i don't know that list is for only C++ version or same as python version.
ps. my first laptop i download and install manually and second laptop i install by typing python -m pip install opencv-python and i get opencv 3.2
So i want to check it and try a difference version to know more about them by myself.
Add more in formation :
I'm not good in english but this link might help you understand my point. As they say "those functions are just not wrapped into python or java" for opencv 3.0. So instead of asking many simple question about many function because of my curiosity. I think asking this question will help me can learn, compare difference between version by myself. I'm sorry if i can't explain my you to understand

How to install scikit-learn for Portable Python?

While I am trying to install scikit-learn for my portable python, its saying " Python 2.7 is not found in the registry". In the next window, it does ask for an installation path but neither am I able to copy-paste the path nor write it manually. Otherwise please suggest some other alternative for portable python which has numpy, scipy and scikit-learn by default. Please note that I don't have administrative rights of the system so a portable version is preferred.
you can easily download SciKit executable, extract it with python, copy SciKit folder and content to c:\Portable Python 2.7.5.1\App\Lib\site-packages\ and you'll have SciKit in your portable python.
I just had this problem and solved this way.
From my other answer:
Since you are using Portable Python, the best way to install modules is to use easy install. Go to your Portable Python folder directory: Portable Python 2.7.6.1.
Next open a command prompt in that location by Shift + Right Click.
Then type the following:
App\Scripts\easy_install.exe YourModuleNameHere
Example to install scikit-learn:
App\Scripts\easy_install.exe scikit-learn
enter code here`enter code here`enter code here`
you can download the new portable python setup from the http://koen.me/research/teaching-asci/PortablePython.zip . This setup already contains the scikit-learn.
In case you're on Windows, WinPython is a 64bit portable distribution that contains scikit-learn as an optional component.
Afaik, this is the only 64 bit distribution with the scipy stack for Windows.

Django 1.5 : Python 2.7 or Python 3

Django just release their 1.5 version.
It now supports Python 3, my question is quite simple indeed: With this 1.5 Version, should I still use Python 2.7 or Python 3 ? I assume that with Python 3 there will be some issues with 3rd parties app no ?
In your case, what would you do ?
The release notes state clearly that Python 3 support in 1.5 is experimental. And yes, third-party apps will be a problem.
If I was starting a new development which I didn't expect to go live until well after version 1.6 is released (when Python 3 support is supposed to be production ready, and hopefully the 3rd party apps have caught up) , then yes, I would go with Python 3. It is significantly cleaner than Python 2.7.
But if you want your site up and running in the near future, stick with 2.7.
I would still use python 2.7 because many apps and libraries are not ready for python 3.x
PIL is not working correctly with python 3

Are there any Python template engines that support Python 3.x

It seems they all run on Python 2.x.
(Actually I want a more widely-used engine that has Python 3.x support.)
Just released Jinja 2.3 has experimental support for Python 3. http://lucumr.pocoo.org/2010/2/10/jinja-2-3-released
If you don't mind using beta software, the newly-released moody-templates was written for Python 3 from the ground up.
https://github.com/etianen/moody-templates
Maybe very outdated, but Mako supports python 3.
The first search result is the templating wiki page; which includes at least one templating engine which says it works on Python 2.4, 2.5, 2.6 and 3.0.