Installing numpy
-
On 26/01/2016 at 03:30, xxxxxxxx wrote:
Progress 2.
I added python to the windows path.
Started up cmd, went to to the folder C:\Program Files\MAXON\CINEMA 4D R17\resource\modules\python\Python.win64.framework\setuptools-19.6
and gave the command:
> python setup.py install"Finished processing dependencies for setuptools == 19.6"
So everything seems ok. -
On 26/01/2016 at 04:19, xxxxxxxx wrote:
Progress 3.
Step 2. Modify your Python include and libs folder
The include and libs each contain a python27 subdirectory.
You need to move the contents of this directory one level up so they files are directly in the include/libs folder.Which folder should be moved one level up.
libs to include or include to libs.Skip this one and I proceed to Step 3.
Step 3. Build the Python Extension
This example uses NumPy.
First, download the source code from GitHub or another mirror and unpack it.
After the package is built, a binary distribute will be created as a ZIP file.I downloaded Numpy and unzipped it to emp
The I gave the command:
emp\numpy-master\python setup.py installThis gave the error message:
RuntimeError: Running cythonize failed!Awaiting an answer, I go back to plan B: Install the binary.
-
On 26/01/2016 at 05:47, xxxxxxxx wrote:
Progress 3.
Installing the binary.
- I downloaded pip and installed it using the get-pip.py script- from http://www.lfd.uci.edu/~gohlke/pythonlibs/
I downloaded numpy-1.10.4+mkl-cp27-none-win_amd64.whl
Note: cp27 indicates it is for python 2.7Went to the folder where pip.exe is located and gave the command:
pip install emp\numpy-1.10.4+mkl-cp27-none-win_amd64.whlResult: Successfully installed numpy-1.10.4
- started python and said import numpy
This gave the same result as described in this post.
So, I need to recompile numpy.
Back to square 1.-Pim
-
On 26/01/2016 at 06:31, xxxxxxxx wrote:
I did step 1.2 so now the current folder is the setuptools-19.6 folder.
I executed step 1.3 call "%PY%" setup.py install and there is goes wrong:
The filename, directory name, or volume label syntax is incorrecYou actually need to omit the quotes, I'll correct that in my blog post. Just call %PY%
I downloaded Numpy and unzipped it to emp
The I gave the command:
emp\numpy-master\python setup.py installThis gave the error message:
RuntimeError: Running cythonize failed!Are you sure just plain "python" is the right Python installation (the on in the Cinema 4D framework)?
What's more to the error message? I didn't get a "cythonized failed" error.[quote]Installing the binary.
- I downloaded pip and installed it using the get-pip.py script- from http://www.lfd.uci.edu/~gohlke/pythonlibs/
I downloaded numpy-1.10.4+mkl-cp27-none-win_amd64.whl
Note: cp27 indicates it is for python 2.7Went to the folder where pip.exe is located and gave the command:
pip install emp\numpy-1.10.4+mkl-cp27-none-win_amd64.whlResult: Successfully installed numpy-1.10.4
- started python and said import numpy
This gave the same result as described in this post.
So, I need to recompile numpy.
Back to square 1.Might be coming from the fact that its not compiled with the right Visual Studio version.
I just read in the post you linked that Andreas said it must be VS2012 SP4, interestingly it
worked with VS2008 here too. -
On 26/01/2016 at 09:15, xxxxxxxx wrote:
See below the full error messages.
Python links to the cinema 4d python environment / folders:
C:\Program Files\MAXON\CINEMA 4D R17\resource\modules\python\Python.win64.framework\python.exeThe big question is: how to compiled with the right Visual Studio version?
-
On 26/01/2016 at 09:50, xxxxxxxx wrote:
FYI. I tried to reply to your PM pgrooff. But your inbox is full.
I personally don't bother to compile these things myself.
I use many of the common Python libraries via Anaconda.
And the precompiled version of opencv3.1.exe installs both the C++ and Python libraries.The quick and simple way to install this stuff:
-Install Anaconda(or python 2.7 if you prefer) and install opencv.exe with their installers
-Then put the opencv cv2.pyd file in the Anaconda site-packages folder
-Then copy the entire Anaconada folder to the C4D folder where Python.win64.framework is
-Rename Python.win64.framework to: Python.win64.framework_original
-Rename the copied Anaconda folder to:Python.win64.framework
-Boom...Done
No fuss...no muss...no cocoanuts.
I only compile things myself when I have absolutely no other choice.*** Public Service Announcement Here ***
It might be frowned upon by Maxon to replace their python installation with another python installation.
But it's the easiest way to do it. And so far I've never seen any problems doing it.-ScottA
-
On 29/01/2016 at 09:33, xxxxxxxx wrote:
Sorry, my fault (although 5 is a bit small!).
Thanks for the information. I will try it and let you know!
-Pim
-
On 29/05/2016 at 01:56, xxxxxxxx wrote:
Niklas,
Thanks for all this.
There is one more thing missing....isn't there always!
Are you going to put up a numpy for R17 (2.7) on a mac?
I don't see it. -
On 30/05/2016 at 16:00, xxxxxxxx wrote:
Just added numpy-1.11.0 for Python 2.7 (Mac) here: https://public.niklasrosenstein.com/PythonBinaries/numpy-1.11.0/
-
On 03/06/2016 at 00:22, xxxxxxxx wrote:
Niklas,
Thanks for all you do here!
Chris