Prebuilt Python Caffe for OSX - python

Is there any pre-built PyCaffe out there for OSX? I do see instructions on how to build it but I'm sure I'll have a lot of difficulties trying to build all of its dependencies. So, I'd appreciate it anyone knows where I can get the prebuilt PyCaffe module? Or is it necessary that it gets fully built on the machine?
Thanks

In case you're familiar with docker, you could try: https://github.com/ryankennedyio/deep-dream-generator
On OS X, you'll need to have boot2docker or some such.
Anyway, I was able to get up and running in under 5 minutes or so with this approach, after spending an hour or so (and giving up) downloading/building/installing dependencies directly.

Related

Packaging Kivy application to Android - Windows

I finished writing the code for a simple game using Kivy. I am having a problem converting it to Android APK, since I am using a windows computer. From some earlier research I got to know that using a Virtual machine is recommended, but I have no idea on how to download and use one :(, and if my slow PC can handle it... please help me. If possible, kindly recommend another way to convert to APK.
I am a beginner at coding as a whole, please excuse me if my question is stupid.
you could just try downloading a virtual box and installing linux operating system or you could directly install it and keep it a drive called F or E and you could just install python on that and all the required pakages and start the build using buildozer as it is not available for windows. So try doing it. But I need to do it just now. Tell me after you have tried that cuz there are a lot of people online on youtube who would heloo you doing that work

How do I run the Deep Dream source code?

(I downloaded the deep dream source code from https://github.com/google/deepdream)
First of all, I'm not interested in purely Deep Dream only, but machine learning, and deep learning in particular, as a whole. I know programming (but by no means an expert) and python syntax etc. However, I'm not familiar with external libraries and how to properly install them.
Thus, I'm struggling with simply getting the source code for Deep Dream to run. Here's what I've done so far:
Installed Python, but it couldn't run the .ipynb (nor did it include any of the libraries) file so I:
Installed Anaconda, but it didn't include Caffe so I:
Downloaded Caffe, but it requires cudNN(??) so I:
Downloaded cudNN (Does it require Cuda (whatever that is?))
What are the next steps? There are so many things to download and install and I have no experience with any of it except for Python programming itself.
I tried reading the install instructions but they get me even more confused.
What are the steps I should take next in order to get it running?
Keep in mind that I'm a beginner. No hate please. Official documentation and terminology are still hard to understand. I'm simply looking for step-by-step instructions.
Thanks in advance!
Edit: I'm using Windows
[Promoted from a comment]
If you're not familiar with it, Docker is going to be your easiest option. Think of a docker container as as a portable, fully self-contained VM.
You can install docker on almost any OS, then use it to load a container which has all the software pre-installed.
You can get docker here and you can get the CPU / GPU container by following the instructions here.
Note that Docker's really handy for other things too - eg I have containers for Centos 6/6.5/7, RHEL, SLES, Windows, etc... for testing and as servers.

Cython Build Service

I'm working on porting a Python package over to Cython, but would rather provide as many pre-compiled binary packages of it as possible so that users don't need to have Cython on their system.
I've had no lucking finding one so it probably doesn't exist but is there a Cython package build service available somewhere? Basically, I want to be able to build for Windows, Linux, Mac, ARM in both x86 and x64 varieties which means I need to create at least 8 separate builds. I'd certainly be willing to either pay for or go through the hassle of setting up an automated build system that would do that for me, on demand.
Also, I don't currently own a Mac and would rather not have to buy one just for the sake of building this package.
I don't think this question is specific to Cython, but rather any Python module which has Extensions.
Several of the Continuous Integration services allow you to create build "artifacts". You can use this feature to automate your builds.
I've used Appveyor to do this for Windows (https://www.appveyor.com/) - see an example project here: https://ci.appveyor.com/project/snorfalorpagus/appveyordemo
I'm aware that Travis can do this for Linux and OS X, although I've not tried this myself.
I've found that using Anaconda greatly simplifies things (http://conda.pydata.org/miniconda.html).
I'm not aware of a single system that does everything but that may just be because I've never looked.

Handle multiple version at the same time?

I am currently developing an application based on Opencv (more info here).
In order to ensure that everything is working fine, I would like to try the same code with multiple versions of OpenCV (2.3, 2.4).
This is mainly aiming for Linux development, but I wouldn't mind finding a solution for Windows also.
As a bonus, I'd really be glad If I could also switch between version from packages, and other compiled from sources.
The solution I am currently thinking about is to download and compile several versions (without the make install) and then use the chosen release folder manually for imports.
This doesn't solve the package intstall issue, and may not be really usable in the long run
What yould be the best way to achieve such an objective ?
Virtualenv seems to be the good solution for this :
virtualenv is a tool to create isolated Python environments.
...
Imagine you have an application that needs version 1 of LibFoo, but
another application requires version 2. How can you use both these
applications?

Python development setup

So, id like to start serious python development, and its proven to be a big pain. Im not worried at all about the language itself; I like it well enough and I will have no problems picking it up. But the ecosystem is driving me crazy.
First I tried to get up and running under windows. I gave up on that after a few days, as 90% of packages dont include windows support / install instructions. So I switched to macosx, which people said was good for mac development.
More frustration ensues. Id like to use python as a matlab replacement and tool development platform, so spyderlib seems like an excellent tool. But now ive been busy trying to build pyqt on my mac for two days, to no avail, and im starting to question the wisdom of it all. Obviously, following several guides literally invariantly ends in cryptic errors. For which platform was this dependency built? What arcane compiler flags need to be set? I dont know and I dont care; why doesnt the installer figure it out? Oh wait, there isnt any... I want to USE these tools, not first completely reverse engineer them to find out how to build them.
There is a vast amount of implied knowledge in all the documentation I can find on these matters, both with regard to unix and pythonic quirks. Is there any way to scale this mountain, in a place with a managable learning curve? Right now I have no idea what im doing. Or should I go back to windows and try to coerce the unix packages I need into cooperation?
On Mac OS X, you can get spyder with macports. This should build everything needed.
If you prefer Windows, take a look at Python(x,y). It has a bunch of scientific tools pre-built, including spyder.
Finally, the Enthought Python distribution is worth considering for scientific work.
Have you tried ActivePython?
Why battle with compiling the modules yourself when you can get the pre-built packages from PyPM?
pypm install pyqt4 matplotlib scipy numpy
From my experience the best platform for kind of project you're describing is Linux. There you just install the libs you need from package manager and that's it. Binary packages, so compiling is not required.
If you want to stick with MacOS X, you should install either MacPorts or Fink. It's usually easy to use. Problem is, that things like Qt take forever to compile. But you won't be doing that very often.
As for installing Python modules, the best is PIP, which is very nice replacement for easy_install did does much more. Especially useful if you want virtualenv setup.
This is nearly the exact opposite of my experience with Python on Windows. Python itself installs with a binary installer, most add-on packages support easy_install, others provide binary installers of their own. The IDE I use is SciTE, which uses the old DOS install model - copy the files to a directory and run the SciTE.exe file. If you get a source distribution of a Python package, go to the directory containing setup.py and run python setup.py install. Maybe that's the implied knowledge you're talking about.
You can also find many unofficial Windows binaries at http://www.lfd.uci.edu/~gohlke/pythonlibs/.
I switched to Mac a few years ago and found that it took me quite a while of googling to properly install all the packages I needed for Python development. While I installed everything I made a list of the steps required to setup a functional system that may be appropriate for you as well. I usually use NetCDF4, HDF5, Numpy, Matplotlib, f2py, and Fortran in combination with Python. I published my list of 22 setup-steps for installing from source on my website. Installing from source is somewhat more time-consuming than using macports and fink, but enables you to have a working environment that is optimized for your system.

Categories