I am having a hard time trying to install the Shogun machine-learning toolbox via MacPorts. It seems that the only version MacPorts has declares Python 2.6 as a dependency and as a result MacPorts downloads and installs Python 2.6, numPy for Python 2.6 etc. The problem is I have Python 2.7 already installed and a host of other packages, including numPy, that I want to use with shogun already installed under Python 2.7.
Has anyone had success using shogun with Python 2.7. I couldn't find any documentation stating it only works with 2.6, so I assume 2.7 should work.
It looks like it needs to be converted to a python Portgroup port where the python version is implied from the current python see py-scipy for an example depending on py-numpy.
Also see the current threads on the macports mailing list for octave.
Related
I've just switched to MacBook M1 machine and having trouble installing pandas. I noticed that in addition to PyPi pandas there is a MacPorts py38-pandas package. I could not install the PyPi pandas due to some compilation error but successfully build and installed MacPorts version. However, after installing the py38-pandas I still cannot import pandas in Python3 interpreter.
What is the purpose of these MacPorts Python packages and how are they different? Can I make MacPorts py38-pandas importable in Python 3 interpreter?
I intentionally do not use homebrew.
I have installed python38 via MacPorts and made it available in shell. So, python3 starts Python 3.8 which was installed via MacPorts.
You are using the preinstalled python3, not the MacPorts version.
Perhaps you should read the accepted answer of How to: Macports select python to understand what happens.
Basically you need to set your PATH, that you are using the MacPorts python3 which is usually installed to /opt/local/bin/python3.
This is done by the MacPorts in your $HOME/.profile by adding a line like:
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
I'm developing with Python on CentOS. Needed Python 2.7 for a certain project. Didn't want to mess with the existing Python 2.6 (64-bit) installation, so installed Python 2.7 (32-bit). Haven't had a problem up until now.
Now I need a new library: lxml. It's actually already installed in the default 2.6 installation, but I need it for Python 2.7. None of the existing installation instruction seem to work. Specifically, I can't use a package manager (for CentOS it's yum), because it is only updating things for the default 2.6 installation. And again, everything from yum is already complete because Python 2.6 already has lxml installed.
If I type in "pip install lxml" I get a ton of error messages but finally it says, "Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?"
Okay, fine. So if I type in "STATIC_DEPS=true pip install lxml", it just times out and fails to download the prerequisites.
Any solution, especially sticking just to pip?
On the project's website it tells me, that there is Python 3.4 support (Readme.md, which is shown as text on that page). However, I fail to see where I could get that Python 3.4 compatible version of SFrame from. It's not on anaconda and not on PyPI, where I only see Python 2.7 versions.
So I wonder, if they simply didn't update their Readme.md to note the fact, that SFrame is not available for Python 3.4 anymore, or if it is somewhere, where I didn't find it. Why should they note that there is no support for Python 3.5.x yet after all, if they didn't have it for 3.4.
I did install it for a Python 3.4.5 anaconda environment before and if I recall correctly, that was from PyPI, so I am thinking they took it down from there for some reason.
Does anyone know how to get a Python 3.4 compatible version of SFrame into an anaconda environment today?
I basically use python 3.4 and the numpy 1.3.0 had been installed and launched successfully on my windows machine.
Recently, I've just installed python 2.7, in order to use Brian2 library, but I've an error in traceback as Importing numpy failed: No module named numpy, whereas it has been installed and works well under aegis of python 3.4
Actually, when I switch the interpreter address to python 2.7, the problem will be happened, in which the numpy is totally hidden in view of the python 2.7...
Any help?!
Edit:
I even tried to choose python 2.7 (As it was detected automatically in registry), within the re-installation of numpy... but still there is nothing as the installed package in Python Interpreters -> Python 2.7
Python x.y (on Windows) generally expects to find 3rd party modules and packages in .../pythonxy/Lib/site-packages. If the module or package is pure python code that is compatible with multiple python versions (such as code that works with 2.6 and 2.7, or 3.3 and 3.4, or much more rarely 2.7 and 3.4), then it is possible to access one copy of the package from multiple site-packages directories. (This is done with x.pth files, which is another topic not relevant here.)
However, on Windows, anything compiled from C must be compiled for Windows and a particular version of Python, including 32 versus 64 bits. (This is currently a requirement of Microsoft C, which may change in the future.) To run with 3.4.x, you installed numpy-1.3.0-for-3.4-winxx. To run with 2.7, you must install numpy compiled for 2.7.
By the way, current numpy is 1.8, with 1.9 due soon. You might want to take the opportunity to upgrade. If you have trouble getting Windows binaries for python extensions, gohlke's site is excellent.
I've read that there's a nice text-to-speech package called pyttsx that can be included in my Python scripts. As soon as I try to install pyttsx things start falling apart fast. pyttsx is for Python 2.6 (2.7 maybe?) not 3.3. I have 2.7 and 3.3 (also Portable Python 2.7 and 3.2) installed but I can't get setuptools or easy_install to work. I got distribute partly installed but I'm might have seen some errors at the end of its installation so I'm not sure it's working and it won't install pyttsx anyway. There's a Windows .exe program that will let you install Python packages but it won't work for 64-bit Python. I've been searching for answers for days can can't come up with anything specific enough.
How do I install Python packages with 64-bit Python 3.3 on 64-bit Windows 7, or is that even possible?
Best source ever!
this man is a wicked fellow.
With distribute installed, launch the python.exe you want to use.
From within python interactive, run the following code:
from setuptools.command import easy_install
easy_install.main(["-U", "package"])
Substitute "package" for whatever you wish to install.