How workaround this ModuleNotFoundError error that only occurs in the WebbPSF environment?How to copy a dictionary and only edit the copyHow to access environment variable values?Relative imports for the billionth time“Large data” work flows using pandasPython 3.7 and psycopg2. ImportError: DLL load failedpython install pip with error “ModuleNotFoundError: No module named '_struct'”Error while creating the virtual environmentFatal error: can't find pdcurses.dll for linking, make sure PDCurses v3.4+ is in the same folder as UniCursespyenv fails with : ModuleNotFoundError: No module named '_ctypes' errorException has occurred: ModuleNotFoundError in Python

What sort of solar system / atmospheric conditions, if any, would allow for a very cold planet that still receives plenty of light from its sun?

Why do we need a voltage divider when we get the same voltage at the output as the input?

Does the problem of P vs NP come under the category of Operational Research?

Misrepresentation on DS-160

Applying for mortgage when living together but only one will be on the mortgage

Need help in optimizing the below helper class

How to draw twisted cuves?

Declaring a visitor to the UK as my "girlfriend" - effect on getting a Visitor visa?

linearization of objective function

Plotting Chebyshev polynomials using PolarPlot and FilledCurve

Is this popular optical illusion made of a grey-scale image with coloured lines?

A conjectural trigonometric identity

How is Sword Coast North governed?

If a Shadow Magic sorcerer casts Darkness using the Eyes of the Dark feature, can they cast another spell that requires concentration?

What's the term for a group of people who enjoy literary works?

How long should I wait to plug in my refrigerator after unplugging it?

Pre-Greek θάλασσα "thalassa" and Turkish talaz

When did J.K. Rowling decide to make Ron and Hermione a couple?

Overprovisioning SSD on ubuntu. How? Ubuntu 19.04 Samsung SSD 860

Word to describe someone doing something even though told not to

HackerRank Implement Queue using two stacks Solution

Has J.J.Jameson ever found out that Peter Parker is Spider-Man?

Accurately recalling the key - can everyone do it?

Selecting rows conflicting values in WHERE clause



How workaround this ModuleNotFoundError error that only occurs in the WebbPSF environment?


How to copy a dictionary and only edit the copyHow to access environment variable values?Relative imports for the billionth time“Large data” work flows using pandasPython 3.7 and psycopg2. ImportError: DLL load failedpython install pip with error “ModuleNotFoundError: No module named '_struct'”Error while creating the virtual environmentFatal error: can't find pdcurses.dll for linking, make sure PDCurses v3.4+ is in the same folder as UniCursespyenv fails with : ModuleNotFoundError: No module named '_ctypes' errorException has occurred: ModuleNotFoundError in Python






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am trying to run a code I downloaded from https://github.com/szieleniewski/NIFSIM to analyze data from JWSTelescope. While running the main file, jwsim.py, I get a module error on one of the definitions.



I am currently using Python 3.7, Ubuntu 16.04, and I work under an environment (called webbpsf-env). These details can not be changed, since WebbPSF (a program I am using with the code) requires such versions to work. The main jsim.py file is stored in the Downloads folder.



I get the following error:



(webbpsf-env) aleejandrof@aleejandrof-Satellite-C55t-B:~/Downloads/NIFSIM-master$ python jsim.py
*File* "jsim.py", line 18, in <module>
*from* src.JSIM_main *import* main
File "/home/aleejandrof/Downloads/NIFSIM-master/src/JSIM_main.py", line 22, in <module>
*from* JSIM_Specres *import* spectral_res
ModuleNotFoundError: No module named 'JSIM_Specres'


The mentioned line is this one:



from JSIM_Specres import spectral_res


I've been told, that if I work ouside the environment, the module could be found. For me this is not an option since Webbpsf requires working inside an environment. I have tried downloading the master file again inside the environment (through pip), but it could not be done. Is there a way to "insert" a file into an environment? what should I do?










share|improve this question


























  • You need to pip install whichever package has JSIM_Specres in your virtualenv.

    – wmorrell
    Mar 27 at 0:45






  • 1





    i would suggest you to refactor the code and improve import statement (eg in the file JSIN_Specres use from .JSIM_Specres import spectral_res

    – prashant rana
    Mar 27 at 1:29

















1















I am trying to run a code I downloaded from https://github.com/szieleniewski/NIFSIM to analyze data from JWSTelescope. While running the main file, jwsim.py, I get a module error on one of the definitions.



I am currently using Python 3.7, Ubuntu 16.04, and I work under an environment (called webbpsf-env). These details can not be changed, since WebbPSF (a program I am using with the code) requires such versions to work. The main jsim.py file is stored in the Downloads folder.



I get the following error:



(webbpsf-env) aleejandrof@aleejandrof-Satellite-C55t-B:~/Downloads/NIFSIM-master$ python jsim.py
*File* "jsim.py", line 18, in <module>
*from* src.JSIM_main *import* main
File "/home/aleejandrof/Downloads/NIFSIM-master/src/JSIM_main.py", line 22, in <module>
*from* JSIM_Specres *import* spectral_res
ModuleNotFoundError: No module named 'JSIM_Specres'


The mentioned line is this one:



from JSIM_Specres import spectral_res


I've been told, that if I work ouside the environment, the module could be found. For me this is not an option since Webbpsf requires working inside an environment. I have tried downloading the master file again inside the environment (through pip), but it could not be done. Is there a way to "insert" a file into an environment? what should I do?










share|improve this question


























  • You need to pip install whichever package has JSIM_Specres in your virtualenv.

    – wmorrell
    Mar 27 at 0:45






  • 1





    i would suggest you to refactor the code and improve import statement (eg in the file JSIN_Specres use from .JSIM_Specres import spectral_res

    – prashant rana
    Mar 27 at 1:29













1












1








1








I am trying to run a code I downloaded from https://github.com/szieleniewski/NIFSIM to analyze data from JWSTelescope. While running the main file, jwsim.py, I get a module error on one of the definitions.



I am currently using Python 3.7, Ubuntu 16.04, and I work under an environment (called webbpsf-env). These details can not be changed, since WebbPSF (a program I am using with the code) requires such versions to work. The main jsim.py file is stored in the Downloads folder.



I get the following error:



(webbpsf-env) aleejandrof@aleejandrof-Satellite-C55t-B:~/Downloads/NIFSIM-master$ python jsim.py
*File* "jsim.py", line 18, in <module>
*from* src.JSIM_main *import* main
File "/home/aleejandrof/Downloads/NIFSIM-master/src/JSIM_main.py", line 22, in <module>
*from* JSIM_Specres *import* spectral_res
ModuleNotFoundError: No module named 'JSIM_Specres'


The mentioned line is this one:



from JSIM_Specres import spectral_res


I've been told, that if I work ouside the environment, the module could be found. For me this is not an option since Webbpsf requires working inside an environment. I have tried downloading the master file again inside the environment (through pip), but it could not be done. Is there a way to "insert" a file into an environment? what should I do?










share|improve this question
















I am trying to run a code I downloaded from https://github.com/szieleniewski/NIFSIM to analyze data from JWSTelescope. While running the main file, jwsim.py, I get a module error on one of the definitions.



I am currently using Python 3.7, Ubuntu 16.04, and I work under an environment (called webbpsf-env). These details can not be changed, since WebbPSF (a program I am using with the code) requires such versions to work. The main jsim.py file is stored in the Downloads folder.



I get the following error:



(webbpsf-env) aleejandrof@aleejandrof-Satellite-C55t-B:~/Downloads/NIFSIM-master$ python jsim.py
*File* "jsim.py", line 18, in <module>
*from* src.JSIM_main *import* main
File "/home/aleejandrof/Downloads/NIFSIM-master/src/JSIM_main.py", line 22, in <module>
*from* JSIM_Specres *import* spectral_res
ModuleNotFoundError: No module named 'JSIM_Specres'


The mentioned line is this one:



from JSIM_Specres import spectral_res


I've been told, that if I work ouside the environment, the module could be found. For me this is not an option since Webbpsf requires working inside an environment. I have tried downloading the master file again inside the environment (through pip), but it could not be done. Is there a way to "insert" a file into an environment? what should I do?







python python-3.x module






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 0:50









martineau

74.3k11 gold badges101 silver badges193 bronze badges




74.3k11 gold badges101 silver badges193 bronze badges










asked Mar 27 at 0:33









Alejandro OrtizAlejandro Ortiz

62 bronze badges




62 bronze badges















  • You need to pip install whichever package has JSIM_Specres in your virtualenv.

    – wmorrell
    Mar 27 at 0:45






  • 1





    i would suggest you to refactor the code and improve import statement (eg in the file JSIN_Specres use from .JSIM_Specres import spectral_res

    – prashant rana
    Mar 27 at 1:29

















  • You need to pip install whichever package has JSIM_Specres in your virtualenv.

    – wmorrell
    Mar 27 at 0:45






  • 1





    i would suggest you to refactor the code and improve import statement (eg in the file JSIN_Specres use from .JSIM_Specres import spectral_res

    – prashant rana
    Mar 27 at 1:29
















You need to pip install whichever package has JSIM_Specres in your virtualenv.

– wmorrell
Mar 27 at 0:45





You need to pip install whichever package has JSIM_Specres in your virtualenv.

– wmorrell
Mar 27 at 0:45




1




1





i would suggest you to refactor the code and improve import statement (eg in the file JSIN_Specres use from .JSIM_Specres import spectral_res

– prashant rana
Mar 27 at 1:29





i would suggest you to refactor the code and improve import statement (eg in the file JSIN_Specres use from .JSIM_Specres import spectral_res

– prashant rana
Mar 27 at 1:29












1 Answer
1






active

oldest

votes


















0














The author likely anticipated you had a certain env var set. Try this:



$ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py





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%2f55368121%2fhow-workaround-this-modulenotfounderror-error-that-only-occurs-in-the-webbpsf-en%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









    0














    The author likely anticipated you had a certain env var set. Try this:



    $ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py





    share|improve this answer





























      0














      The author likely anticipated you had a certain env var set. Try this:



      $ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py





      share|improve this answer



























        0












        0








        0







        The author likely anticipated you had a certain env var set. Try this:



        $ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py





        share|improve this answer













        The author likely anticipated you had a certain env var set. Try this:



        $ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 4:50









        J_HJ_H

        6,0891 gold badge9 silver badges24 bronze badges




        6,0891 gold badge9 silver badges24 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            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%2f55368121%2fhow-workaround-this-modulenotfounderror-error-that-only-occurs-in-the-webbpsf-en%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

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현