Will a higher version of Python build Node.js? - node.js

I'm running the latest Ubuntu (14.04) and have just downloaded the Node.js tarball. I'm not very familiar with Python though, and although I love Ubuntu, I'm also not familiar with the process of downloading and installing stuff on Linux as well :/
It says on the Node.js download page that Python 2.6 or 2.7 is required, but I have found that newer versions of Python are available. Will a newer version of Python build it correctly?

If you're not familiar with Linux then I don't think you want to compile node.js yourself from source. You can still use the binaries.tar.gz
There are Ubuntu packages that will install node.js for you! Installing from a package manager is easier, try https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions
As for building from source, there are known issues with Python 3, ref https://github.com/joyent/node/wiki/installation#known-issues, so maybe stick with 2.6 or 2.7

Python versions starting with and including 2.6 up through before 3.0 should work fine. Python 3 brought some backwards incompatible changes with Python 2.x and AFAIK gyp has not been updated to support Python 3 yet.

Related

Difficulty in Installing GraphLab for python 3.5.2

I am a newbie in Machine learning and want to build a recommendation system for my class project. To do so, I need to work with GraphLab. But I cannot find any version of it which will be supported by python 3.5.2. The latest available version is 2.1, which is supported by python 2.7x. Is there any equivalent package of GraphLab, or any alternative ways to build this system?
Currently there's no stable release of GraphLab for python 3.5. They are working on a stable release. However, there were a beta release here for 3.5 which seems to be inaccessible right now. You may try out scikit-learn, H2O as alternative.They have support for 3.5.

Can I update Python 3.5 without downloading and installing entire new version, eg, 3.5.2?

It seems overkill to download and install 3.5.2 from https://www.python.org/downloads/mac-osx/ to simply updgrade from 3.5.0. Is there a Python command that will update itself?
Mac OS 10.11.6
Python 3.5.0
First question: do you need to upgrade?
See the change log. There are no new features introduced in 3.5.2 just various bug fixes. If you are not affected then your time may be better spent elsewhere.
If you do still want to upgrade there is probably no easier way than downloading an upgrade and installing it. Even if you use python to upgrade itself, it would still need to download the same files. There would be no real saving in time.

Twisted for python3.5?

There is no Twisted for python 3.5 at https://pypi.python.org/pypi/Twisted ,I am using python 3.5.2,what should I do?
I recently encounter a similar problem.
try this Unofficial Windows Binaries for Python Extension Packages
http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
Use command "pip install yourfilename.whl"
I used it to fix the problem while installing scrapy
Each new release of Twisted includes updates that bring full equal functionality to the python3 version. Releases are roughly monthly, so you may find that the module already works for you.
It is possible (for example with virtualenv) to install both python2 and 3 How to install both Python 2.x and Python 3.x in Windows 7
Twisted support of python 3 on windows is lagging a little behind support on other systems. So if you have access to another OS you may find that it will allow you to install twisted for python 3.

Anaconda Python for Gurobi 6.0.4 installation _Py_FalseStruct error

In order to run an optimization problem we set up Gurobi 6.0.4 together with
Anaconda (Version 2.2.0) Python (Python 2.7.9.) on
Linux CentOS release 6.6 (Final) with the 2.6.32-504.16.2.el6.x86_64 Kernel
Following the installation guidelines of Gurobi (listed here: http://www.gurobi.com/documentation/6.0/quickstart_linux.pdf)
everything worked out in the first step. Gurobi was installed, could obtain a license. Also the PATH variables have been set (in the .bashrc) according to the manual, with a little extension for the referal to anaconda python (and not the other local Versions of python (being 2.7 and 3.4):
export GUROBI_HOME="/opt/gurobi604/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin:${PATH}:opt/anaconda/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
Following the procedure we executed: python2.7 setup.py install in the respective directory /opt/gurobi604/linux64. After this usually you could run the import gurobipy command in the python interpreter wihtout errors. For older Versions of Gurobi (as 5.6.3) this works out very well.
For 6.0.4 though we constantly receive the error:
ImportError: /opt/anaconda/lib/python2.7/site-packages/gurobipy/gurobipy.so: undefined symbol: _Py_FalseStruct
This is very reproducible, no matter if we put anaconda also in the global path, and check the bash for any overwriting of the environment variables, which is not the case.
On Windows 8 the Gurobi 6.0.4 and Anaconda Python 2.2.0 work together without any problems.
Also applying hints from here: Python Module Error on Linux did not work out.
Did anyone else experience these problems with this tooling combination? thx.
The error message indicates that you use the Python module for version 3.4 in your Python 2.7 package directory. This can happen if you do not clean your Python module build directory between builds. Please try the following:
Completely remove the 2.7 package from your Python 2.7 installation (e.g. remove /opt/anaconda/lib/python2.7/site-packages/gurobipy)
Completely remove the Python module build directory from your Gurobi installation (e.g. /opt/gurobi604/linux64/build)
Re-run the build process for the Python 2.7 module (e.g. run "python2 setup.py install" in /opt/gurobi604/linux64)
Please note that CentOS is currently a non-supported platform for Gurobi.
Thank you for the hint, I think we tried that, but did not finish the procedure in this way. We tried to clean the system but in that particular case still hat both python Versions (due to other applications that use 3.4) on the machine. Our solution in this case was just to reinstall everything clean on a Ubuntu 14.04 VM. Since then no further problems occured. (I know not the cleanest solution.)
We had some similar issues when we updated to Gurobi 6.5, but that could be solved when corrctly addressing the usual path issues.
Thank you in any case for the reply, I think this really will help us with the next, then clean deployment :-)

When Python 3.2.3 isn't good enough

Something I'm doing works under the latest Windows Python 2 and 3, latest Debian Python 2 and 3, and Cygwin Python 2, but fails under Cygwin Python 3.2.3. Known bug fixes after 3.2.3 on Windows deal with the problem.
Where does that realistically leave me concerning deployment, if the latest version using traditional distribution paths (latest Cygwin Python 3) isn't high enough, should I:
tell the user oops, wait for an upgrade
tell the user to manually download a newer Python to shadow the official distro version
tell the user to use Windows Python 3 instead of Cygwin Python 3 to run this program
downgrade my code to stop using the multiprocessing class where bad things happen
I'm testing on six versions of Python right now and didn't even try OS X or BSD yet. Are compatibility issues and having to downgrade code to just not use certain Python Standard Library classes something others have to do often?
I accept the answer from Billy ONeal in the comment above

Resources