Code Monkey home page Code Monkey logo

Comments (6)

petrushy avatar petrushy commented on June 16, 2024

Hi!
Yes it is because orekit and some other conda packages needs the environement to be "activated" in order to get the right environment variables. This is automatically done when opening through the conda prompt. Pycharm and spyder accesses the python binary directly normally without activating the environment.

To solve this, one can either activate the environment prior to starting pycharm or spyder through the command line or use a package called conda-wrappers that makes "pseudo" binaries for the environment that automatically also activates it. These are accessed in the scripts/wrappers/ directory in your python installation after installing the conda-wrappers package.

from orekit-feedstock.

petrushy avatar petrushy commented on June 16, 2024

There are some more info about installation and if you want to specify the paths manually at

https://www.orekit.org/forge/projects/orekit-python-wrapper/wiki

from orekit-feedstock.

petrushy avatar petrushy commented on June 16, 2024

Closing as no further response and very likely the root cause.

from orekit-feedstock.

quamobrem avatar quamobrem commented on June 16, 2024

Hello Petrus,

I was indeed trying to follow the same guidelines to point Spyder to the wrapper in Scripts/wrappers/conda/python.bat, but a .bat file is not considered an interpreter by Spyder? I am very new to python so I apologize if that sounds weird.
Indeed, if I open Spyder from the anaconda prompt, no problems importing orekit.
If I open spyder from the command prompt or through shortcut, it gives me this error, even though I only have one env, base, and it is activated.
In any case I can keep launching Spyder from conda prompt. Activation of python environments has really bugged me so I would like to get to the bottom of it

from orekit-feedstock.

petrushy avatar petrushy commented on June 16, 2024

Hi @quamobrem

Yes it is the activation of environement thing you are experiening, this needs to be done prior to using orekit. If you launch spyder from the start menu directly this is not done. You can also launch spyder from the anaconda-launcher application, that is activating the environment as well.

Regards

from orekit-feedstock.

quamobrem avatar quamobrem commented on June 16, 2024

Thank you very much for your help Petrus, cheers!

from orekit-feedstock.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.