I have a python script that, when opened in VSCode or any other code editor, fails to import the arch
package. After making sure that it was downloaded and that I wasn’t running in any virtual environment, I tried running the script from terminal with python ./file.py
. To my surprise, no error was reported and the segment of code which relied on the arch
package ran as expected.
I first tried downloading with conda
, then pip
, and then finally using pip
to download the package directly from git. Not sure if this is important, but running pip list --format=freeze
showed that my arch version was 0.0.0 until I downloaded directly from git, where it now displays arch==7.0.1.dev6+g9ced09e
. The issue still persists, however.
Any thoughts on where this discrepancy may come from, or how I can go about figuring it out?
Line from my script:
from arch import arch_model
Error message:
Unable to import 'arch' (import-error)
Expectation:
Import would succeed and I would be able to employ the package. This result is achieved when I run python ./file.py
from terminal.
titfortat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.