ImportError: uncompyle2 even though it's installed





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I am trying to use the code in this github project: https://github.com/Katharsis/unfrozen_binary



When I try to run the script: python unfrozen_binary_cx_Freeze.py



I receive the following error:



File "/path/to/file/unfrozen_binary-master/common.py", line 20, in <module>
from decompilers.uncompyle2 import uncompyle_file
ImportError: No module named decompilers.uncompyle2


I checked common.py and it imports uncompyle package as shown below:



if python_version[0] == 3:
from decompilers.unpyc3.unpyc3 import dec_module
elif python_version[0] in (1, 2):
from decompilers.uncompyle2 import uncompyle_file
from decompilers.uncompyle2 import Walker


There is no decompilers package available.



However, I already have uncompyle2 installed so, I edited the above code to use uncompyle2 only since I am using Python version 2.7



Now, I receive the ImportError for uncompyle2 even though I have both uncompyle2 and uncompyle6 installed. Even confirmed this with pip show command.



>>> import uncompyle2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named uncompyle2
>>> import uncompyle6
>>>


However, pip show command shows that uncompyle2 is installed:



$ pip show uncompyle2
Name: uncompyle2
Version: 2.0.0
Summary: Python byte-code to source-code converter
Home-page: https://github.com/rocky/python-uncompyle6
Author: Hartmut Goebel
Author-email: h.goebel@crazy-compilers.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: uncompyle6


Is anyone able to get the above github project working?



Please let me know.



Thanks.










share|improve this question

























  • Keep in mind it says decompilers.uncompyle2, not just uncompyle2. Have you tried pip install decompilers?

    – Green Cloak Guy
    Nov 17 '18 at 1:21











  • There's no such package called as decompilers. At least, I could not find one. Could you find it? There was even an issue logged in github for this by someone: github.com/Katharsis/unfrozen_binary/issues/1 however there's no response.

    – Neon Flash
    Nov 17 '18 at 1:33


















1















I am trying to use the code in this github project: https://github.com/Katharsis/unfrozen_binary



When I try to run the script: python unfrozen_binary_cx_Freeze.py



I receive the following error:



File "/path/to/file/unfrozen_binary-master/common.py", line 20, in <module>
from decompilers.uncompyle2 import uncompyle_file
ImportError: No module named decompilers.uncompyle2


I checked common.py and it imports uncompyle package as shown below:



if python_version[0] == 3:
from decompilers.unpyc3.unpyc3 import dec_module
elif python_version[0] in (1, 2):
from decompilers.uncompyle2 import uncompyle_file
from decompilers.uncompyle2 import Walker


There is no decompilers package available.



However, I already have uncompyle2 installed so, I edited the above code to use uncompyle2 only since I am using Python version 2.7



Now, I receive the ImportError for uncompyle2 even though I have both uncompyle2 and uncompyle6 installed. Even confirmed this with pip show command.



>>> import uncompyle2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named uncompyle2
>>> import uncompyle6
>>>


However, pip show command shows that uncompyle2 is installed:



$ pip show uncompyle2
Name: uncompyle2
Version: 2.0.0
Summary: Python byte-code to source-code converter
Home-page: https://github.com/rocky/python-uncompyle6
Author: Hartmut Goebel
Author-email: h.goebel@crazy-compilers.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: uncompyle6


Is anyone able to get the above github project working?



Please let me know.



Thanks.










share|improve this question

























  • Keep in mind it says decompilers.uncompyle2, not just uncompyle2. Have you tried pip install decompilers?

    – Green Cloak Guy
    Nov 17 '18 at 1:21











  • There's no such package called as decompilers. At least, I could not find one. Could you find it? There was even an issue logged in github for this by someone: github.com/Katharsis/unfrozen_binary/issues/1 however there's no response.

    – Neon Flash
    Nov 17 '18 at 1:33














1












1








1








I am trying to use the code in this github project: https://github.com/Katharsis/unfrozen_binary



When I try to run the script: python unfrozen_binary_cx_Freeze.py



I receive the following error:



File "/path/to/file/unfrozen_binary-master/common.py", line 20, in <module>
from decompilers.uncompyle2 import uncompyle_file
ImportError: No module named decompilers.uncompyle2


I checked common.py and it imports uncompyle package as shown below:



if python_version[0] == 3:
from decompilers.unpyc3.unpyc3 import dec_module
elif python_version[0] in (1, 2):
from decompilers.uncompyle2 import uncompyle_file
from decompilers.uncompyle2 import Walker


There is no decompilers package available.



However, I already have uncompyle2 installed so, I edited the above code to use uncompyle2 only since I am using Python version 2.7



Now, I receive the ImportError for uncompyle2 even though I have both uncompyle2 and uncompyle6 installed. Even confirmed this with pip show command.



>>> import uncompyle2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named uncompyle2
>>> import uncompyle6
>>>


However, pip show command shows that uncompyle2 is installed:



$ pip show uncompyle2
Name: uncompyle2
Version: 2.0.0
Summary: Python byte-code to source-code converter
Home-page: https://github.com/rocky/python-uncompyle6
Author: Hartmut Goebel
Author-email: h.goebel@crazy-compilers.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: uncompyle6


Is anyone able to get the above github project working?



Please let me know.



Thanks.










share|improve this question
















I am trying to use the code in this github project: https://github.com/Katharsis/unfrozen_binary



When I try to run the script: python unfrozen_binary_cx_Freeze.py



I receive the following error:



File "/path/to/file/unfrozen_binary-master/common.py", line 20, in <module>
from decompilers.uncompyle2 import uncompyle_file
ImportError: No module named decompilers.uncompyle2


I checked common.py and it imports uncompyle package as shown below:



if python_version[0] == 3:
from decompilers.unpyc3.unpyc3 import dec_module
elif python_version[0] in (1, 2):
from decompilers.uncompyle2 import uncompyle_file
from decompilers.uncompyle2 import Walker


There is no decompilers package available.



However, I already have uncompyle2 installed so, I edited the above code to use uncompyle2 only since I am using Python version 2.7



Now, I receive the ImportError for uncompyle2 even though I have both uncompyle2 and uncompyle6 installed. Even confirmed this with pip show command.



>>> import uncompyle2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named uncompyle2
>>> import uncompyle6
>>>


However, pip show command shows that uncompyle2 is installed:



$ pip show uncompyle2
Name: uncompyle2
Version: 2.0.0
Summary: Python byte-code to source-code converter
Home-page: https://github.com/rocky/python-uncompyle6
Author: Hartmut Goebel
Author-email: h.goebel@crazy-compilers.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: uncompyle6


Is anyone able to get the above github project working?



Please let me know.



Thanks.







python decompiler






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 '18 at 1:46









rocky

3,85532140




3,85532140










asked Nov 17 '18 at 1:14









Neon FlashNeon Flash

1,31883969




1,31883969













  • Keep in mind it says decompilers.uncompyle2, not just uncompyle2. Have you tried pip install decompilers?

    – Green Cloak Guy
    Nov 17 '18 at 1:21











  • There's no such package called as decompilers. At least, I could not find one. Could you find it? There was even an issue logged in github for this by someone: github.com/Katharsis/unfrozen_binary/issues/1 however there's no response.

    – Neon Flash
    Nov 17 '18 at 1:33



















  • Keep in mind it says decompilers.uncompyle2, not just uncompyle2. Have you tried pip install decompilers?

    – Green Cloak Guy
    Nov 17 '18 at 1:21











  • There's no such package called as decompilers. At least, I could not find one. Could you find it? There was even an issue logged in github for this by someone: github.com/Katharsis/unfrozen_binary/issues/1 however there's no response.

    – Neon Flash
    Nov 17 '18 at 1:33

















Keep in mind it says decompilers.uncompyle2, not just uncompyle2. Have you tried pip install decompilers?

– Green Cloak Guy
Nov 17 '18 at 1:21





Keep in mind it says decompilers.uncompyle2, not just uncompyle2. Have you tried pip install decompilers?

– Green Cloak Guy
Nov 17 '18 at 1:21













There's no such package called as decompilers. At least, I could not find one. Could you find it? There was even an issue logged in github for this by someone: github.com/Katharsis/unfrozen_binary/issues/1 however there's no response.

– Neon Flash
Nov 17 '18 at 1:33





There's no such package called as decompilers. At least, I could not find one. Could you find it? There was even an issue logged in github for this by someone: github.com/Katharsis/unfrozen_binary/issues/1 however there's no response.

– Neon Flash
Nov 17 '18 at 1:33












1 Answer
1






active

oldest

votes


















1














Part of your problem is my doing: with pip install of uncompyle2, right now you are getting uncompyle6, not uncompyle2.



This decision was made because at the time this was done, there wasn't anyone who would step up to maintain any (of the many) forks of uncompyle2. The packager of uncompyle2 on pypi wasn't one of the authors, just a packager. So it was really an untenable situation for him.



If someone wants to step up and maintain uncompyle2, they can contact me and I'll transfer uncompyle2 to someone else. The best maintained version of uncompyle2 seems to be the one under the wibiti account.



If you install that from github sources, then change from decompilers.uncompyle2 import to from uncompyle2 import in the unfreeze_binary code.



I see you have opened an issue with the project in question.. That is good! However since that it seems like the only issue that has ever been opened, and this issue was opened a while ago, this suggests that project is dead like many of the uncompyle2 forks and unpyc3 which only handles Python 3.3. (Many python packages packages, like pip, have recently been telling me that they no longer support Python 3.3, so I doubt unpyc3 is of much use nowadays)



The last commit to the unfrozen_binary project is over 4 years ago. So given its low github ratings, the lack of commits and supports, I would expect other problems down the line.



That said, all of this is open source so I guess you or someone else could fork the code and get it working again. If you do that though, I'd suggest using uncompyle6 which supports lots of Python versions including 2.7, 3.3 and current 3.x versions. For that instead of from decompilers.uncompyle2 import you'd use from uncompyle6 import.






share|improve this answer


























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53347306%2fimporterror-uncompyle2-even-though-its-installed%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Part of your problem is my doing: with pip install of uncompyle2, right now you are getting uncompyle6, not uncompyle2.



    This decision was made because at the time this was done, there wasn't anyone who would step up to maintain any (of the many) forks of uncompyle2. The packager of uncompyle2 on pypi wasn't one of the authors, just a packager. So it was really an untenable situation for him.



    If someone wants to step up and maintain uncompyle2, they can contact me and I'll transfer uncompyle2 to someone else. The best maintained version of uncompyle2 seems to be the one under the wibiti account.



    If you install that from github sources, then change from decompilers.uncompyle2 import to from uncompyle2 import in the unfreeze_binary code.



    I see you have opened an issue with the project in question.. That is good! However since that it seems like the only issue that has ever been opened, and this issue was opened a while ago, this suggests that project is dead like many of the uncompyle2 forks and unpyc3 which only handles Python 3.3. (Many python packages packages, like pip, have recently been telling me that they no longer support Python 3.3, so I doubt unpyc3 is of much use nowadays)



    The last commit to the unfrozen_binary project is over 4 years ago. So given its low github ratings, the lack of commits and supports, I would expect other problems down the line.



    That said, all of this is open source so I guess you or someone else could fork the code and get it working again. If you do that though, I'd suggest using uncompyle6 which supports lots of Python versions including 2.7, 3.3 and current 3.x versions. For that instead of from decompilers.uncompyle2 import you'd use from uncompyle6 import.






    share|improve this answer






























      1














      Part of your problem is my doing: with pip install of uncompyle2, right now you are getting uncompyle6, not uncompyle2.



      This decision was made because at the time this was done, there wasn't anyone who would step up to maintain any (of the many) forks of uncompyle2. The packager of uncompyle2 on pypi wasn't one of the authors, just a packager. So it was really an untenable situation for him.



      If someone wants to step up and maintain uncompyle2, they can contact me and I'll transfer uncompyle2 to someone else. The best maintained version of uncompyle2 seems to be the one under the wibiti account.



      If you install that from github sources, then change from decompilers.uncompyle2 import to from uncompyle2 import in the unfreeze_binary code.



      I see you have opened an issue with the project in question.. That is good! However since that it seems like the only issue that has ever been opened, and this issue was opened a while ago, this suggests that project is dead like many of the uncompyle2 forks and unpyc3 which only handles Python 3.3. (Many python packages packages, like pip, have recently been telling me that they no longer support Python 3.3, so I doubt unpyc3 is of much use nowadays)



      The last commit to the unfrozen_binary project is over 4 years ago. So given its low github ratings, the lack of commits and supports, I would expect other problems down the line.



      That said, all of this is open source so I guess you or someone else could fork the code and get it working again. If you do that though, I'd suggest using uncompyle6 which supports lots of Python versions including 2.7, 3.3 and current 3.x versions. For that instead of from decompilers.uncompyle2 import you'd use from uncompyle6 import.






      share|improve this answer




























        1












        1








        1







        Part of your problem is my doing: with pip install of uncompyle2, right now you are getting uncompyle6, not uncompyle2.



        This decision was made because at the time this was done, there wasn't anyone who would step up to maintain any (of the many) forks of uncompyle2. The packager of uncompyle2 on pypi wasn't one of the authors, just a packager. So it was really an untenable situation for him.



        If someone wants to step up and maintain uncompyle2, they can contact me and I'll transfer uncompyle2 to someone else. The best maintained version of uncompyle2 seems to be the one under the wibiti account.



        If you install that from github sources, then change from decompilers.uncompyle2 import to from uncompyle2 import in the unfreeze_binary code.



        I see you have opened an issue with the project in question.. That is good! However since that it seems like the only issue that has ever been opened, and this issue was opened a while ago, this suggests that project is dead like many of the uncompyle2 forks and unpyc3 which only handles Python 3.3. (Many python packages packages, like pip, have recently been telling me that they no longer support Python 3.3, so I doubt unpyc3 is of much use nowadays)



        The last commit to the unfrozen_binary project is over 4 years ago. So given its low github ratings, the lack of commits and supports, I would expect other problems down the line.



        That said, all of this is open source so I guess you or someone else could fork the code and get it working again. If you do that though, I'd suggest using uncompyle6 which supports lots of Python versions including 2.7, 3.3 and current 3.x versions. For that instead of from decompilers.uncompyle2 import you'd use from uncompyle6 import.






        share|improve this answer















        Part of your problem is my doing: with pip install of uncompyle2, right now you are getting uncompyle6, not uncompyle2.



        This decision was made because at the time this was done, there wasn't anyone who would step up to maintain any (of the many) forks of uncompyle2. The packager of uncompyle2 on pypi wasn't one of the authors, just a packager. So it was really an untenable situation for him.



        If someone wants to step up and maintain uncompyle2, they can contact me and I'll transfer uncompyle2 to someone else. The best maintained version of uncompyle2 seems to be the one under the wibiti account.



        If you install that from github sources, then change from decompilers.uncompyle2 import to from uncompyle2 import in the unfreeze_binary code.



        I see you have opened an issue with the project in question.. That is good! However since that it seems like the only issue that has ever been opened, and this issue was opened a while ago, this suggests that project is dead like many of the uncompyle2 forks and unpyc3 which only handles Python 3.3. (Many python packages packages, like pip, have recently been telling me that they no longer support Python 3.3, so I doubt unpyc3 is of much use nowadays)



        The last commit to the unfrozen_binary project is over 4 years ago. So given its low github ratings, the lack of commits and supports, I would expect other problems down the line.



        That said, all of this is open source so I guess you or someone else could fork the code and get it working again. If you do that though, I'd suggest using uncompyle6 which supports lots of Python versions including 2.7, 3.3 and current 3.x versions. For that instead of from decompilers.uncompyle2 import you'd use from uncompyle6 import.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 28 '18 at 1:47

























        answered Nov 28 '18 at 1:37









        rockyrocky

        3,85532140




        3,85532140
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53347306%2fimporterror-uncompyle2-even-though-its-installed%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python