victorlei / smop

Small Matlab to Python compiler
MIT License
1.08k stars 409 forks source link

Can't use this with Python 3.6 after installing correctly #107

Closed jolespin closed 6 years ago

jolespin commented 7 years ago
 pip install smop
Collecting smop
  Downloading smop-0.35.tar.gz (64kB)
    100% |████████████████████████████████| 71kB 110kB/s
Requirement already satisfied: ply in ./anaconda/lib/python3.6/site-packages (from smop)
Requirement already satisfied: numpy in ./anaconda/lib/python3.6/site-packages (from smop)
Requirement already satisfied: scipy in ./anaconda/lib/python3.6/site-packages (from smop)
Requirement already satisfied: networkx in ./anaconda/lib/python3.6/site-packages (from smop)
Requirement already satisfied: decorator>=3.4.0 in ./anaconda/lib/python3.6/site-packages (from networkx->smop)
Building wheels for collected packages: smop
  Running setup.py bdist_wheel for smop ... done
  Stored in directory: /Users/Mu/Library/Caches/pip/wheels/9d/32/d4/4624add8592ac483b8897d4b3191929ac00b0ee2677d38c065
Successfully built smop
Installing collected packages: smop
Successfully installed smop-0.0.0
Joshs-Air:~ Mu$ smop
Traceback (most recent call last):
  File "/Users/Mu/anaconda/bin/smop", line 7, in <module>
    from smop.main import main
  File "/Users/Mu/anaconda/lib/python3.6/site-packages/smop/__init__.py", line 4, in <module>
    import version
ModuleNotFoundError: No module named 'version'
Joshs-Air:~ Mu$ python
Python 3.6.0 |Anaconda custom (x86_64)| (default, Dec 23 2016, 13:19:00)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
victorlei commented 7 years ago

SMOP has never been ported to python 3. It is a miracle that your installation went that far... try to install with python 2 . If you are stuck call me on Skype victorlei63 taking intoa ccount my time zone is Gmt+2

בתאריך 7 באפר׳ 2017 10:27,‏ "Josh L. Espinoza" notifications@github.com כתב:

pip install smop Collecting smop Downloading smop-0.35.tar.gz (64kB) 100% |████████████████████████████████| 71kB 110kB/s Requirement already satisfied: ply in ./anaconda/lib/python3.6/site-packages (from smop) Requirement already satisfied: numpy in ./anaconda/lib/python3.6/site-packages (from smop) Requirement already satisfied: scipy in ./anaconda/lib/python3.6/site-packages (from smop) Requirement already satisfied: networkx in ./anaconda/lib/python3.6/site-packages (from smop) Requirement already satisfied: decorator>=3.4.0 in ./anaconda/lib/python3.6/site-packages (from networkx->smop) Building wheels for collected packages: smop Running setup.py bdist_wheel for smop ... done Stored in directory: /Users/Mu/Library/Caches/pip/wheels/9d/32/d4/4624add8592ac483b8897d4b3191929ac00b0ee2677d38c065 Successfully built smop Installing collected packages: smop Successfully installed smop-0.0.0 Joshs-Air:~ Mu$ smop Traceback (most recent call last): File "/Users/Mu/anaconda/bin/smop", line 7, in from smop.main import main File "/Users/Mu/anaconda/lib/python3.6/site-packages/smop/init.py", line 4, in import version ModuleNotFoundError: No module named 'version' Joshs-Air:~ Mu$ python Python 3.6.0 |Anaconda custom (x86_64)| (default, Dec 23 2016, 13:19:00) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/victorlei/smop/issues/107, or mute the thread https://github.com/notifications/unsubscribe-auth/AEhsGwle8c5-snpV-nSvJxwOrLygGAzAks5rteVrgaJpZM4M2jIZ .

ghost commented 7 years ago

@victorlei Would you be open to porting to python3?

victorlei commented 7 years ago

Sure. Once your patches pass the octave test suite they will appear in the build. Be warned though that compilers are notoriously easy to break and hard to fix

Special thanks to Rob for taking care of this list.

RobBW commented 7 years ago

Are you aware of https://github.com/nathanprat/2to3-ipynb a tool for converting whole directories using 2to3?

michellepmdong commented 7 years ago

Hi, Victor. I had similar issues still with the 2to3 converter and manual conversion. I'm trying python2 now and ran into different errors. Just wanted to let you know I contacted you over Skype.

bramson commented 6 years ago

Is there any progress on a Python3-friendly version?

victorlei commented 6 years ago

smop depends on numpy, which was not ported to python3 until recently. I'll check today what is numpy status and upload a python3 friendly version once numpy port is ready.

On Mon, Apr 23, 2018 at 4:52 AM, bramson notifications@github.com wrote:

Is there any progress on a Python3-friendly version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/victorlei/smop/issues/107#issuecomment-383432740, or mute the thread https://github.com/notifications/unsubscribe-auth/AEhsG00qU36oDEjD8giKeTxQFl1psZdFks5trTPpgaJpZM4M2jIZ .

-- Calligraphy of geese / Against the sky / The moon seals it / (Buson/Hass)

RobBW commented 6 years ago

You may like to look at icelinker/smop3 on github.com. I found it recently but have not checked it out at all.

Looking forward to your Python 3 version.

Regards Rob Wilkinson

On 24/04/2018, at 17:10, victorlei notifications@github.com wrote:

smop depends on numpy, which was not ported to python3 until recently. I'll check today what is numpy status and upload a python3 friendly version once numpy port is ready.

On Mon, Apr 23, 2018 at 4:52 AM, bramson notifications@github.com wrote:

Is there any progress on a Python3-friendly version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/victorlei/smop/issues/107#issuecomment-383432740, or mute the thread https://github.com/notifications/unsubscribe-auth/AEhsG00qU36oDEjD8giKeTxQFl1psZdFks5trTPpgaJpZM4M2jIZ .

-- Calligraphy of geese / Against the sky / The moon seals it / (Buson/Hass) — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

victorlei commented 6 years ago

Rob

While I am working on smop3 could you show me some usage examples from your experience.

Victor

בתאריך יום ג׳, 24 באפר׳ 2018, 11:31, מאת RobBW ‏notifications@github.com:

You may like to look at icelinker/smop3 on github.com. I found it recently but have not checked it out at all.

Looking forward to your Python 3 version.

Regards Rob Wilkinson

On 24/04/2018, at 17:10, victorlei notifications@github.com wrote:

smop depends on numpy, which was not ported to python3 until recently. I'll check today what is numpy status and upload a python3 friendly version once numpy port is ready.

On Mon, Apr 23, 2018 at 4:52 AM, bramson notifications@github.com wrote:

Is there any progress on a Python3-friendly version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/victorlei/smop/issues/107#issuecomment-383432740, or mute the thread < https://github.com/notifications/unsubscribe-auth/AEhsG00qU36oDEjD8giKeTxQFl1psZdFks5trTPpgaJpZM4M2jIZ

.

-- Calligraphy of geese / Against the sky / The moon seals it / (Buson/Hass) — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/victorlei/smop/issues/107#issuecomment-383849108, or mute the thread https://github.com/notifications/unsubscribe-auth/AEhsG5jDNFY8VFberl_5-9kj0wb48aXZks5truLJgaJpZM4M2jIZ .

victorlei commented 6 years ago

Ported to python 3

RobBW commented 6 years ago

A late & short reply.

Have you seen the site: http://www.numerical-tours.com

There are many python & matlab programs there which execute the same numerical functions in both languages and should therefore give you a number of reliable functional & benchmark tests of Smop translations.

The particular Matlab program I have played around with lately (so far unsuccessfully in Python) is found at: https://github.com/danaberman/non-local-dehazing Written by people at the Weizmann Institute, possibly neighbours of yours!

It is a typically pixel intensive program which could benefit a lot from python supported speed ups. I am also experimenting with getting it going in Octave.

Great to see the recent progress on SMOP. All the version problems have vanished for me and pip installation into Anaconda Python 3 is working fine.

Regards Rob

RobBWilkinson@gmail.com

On 25/04/2018, at 13:04, victorlei notifications@github.com wrote:

Rob

While I am working on smop3 could you show me some usage examples from your experience.

Victor

victorlei commented 6 years ago

you have to install version 0.41 or newer. To be on the safe side remove all old installations of smop first