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;
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
add a comment |
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
You need topip install
whichever package hasJSIM_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 usefrom .JSIM_Specres import spectral_res
– prashant rana
Mar 27 at 1:29
add a comment |
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
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
python python-3.x module
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 topip install
whichever package hasJSIM_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 usefrom .JSIM_Specres import spectral_res
– prashant rana
Mar 27 at 1:29
add a comment |
You need topip install
whichever package hasJSIM_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 usefrom .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
add a comment |
1 Answer
1
active
oldest
votes
The author likely anticipated you had a certain env var set. Try this:
$ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
The author likely anticipated you had a certain env var set. Try this:
$ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py
add a comment |
The author likely anticipated you had a certain env var set. Try this:
$ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py
add a comment |
The author likely anticipated you had a certain env var set. Try this:
$ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py
The author likely anticipated you had a certain env var set. Try this:
$ cd ../NIFSIM-master && env PYTHONPATH=.:src python jsim.py
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
add a comment |
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
You need to
pip install
whichever package hasJSIM_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