简体   繁体   中英

ModuleNotFoundError although package has been installed correctly

I'm getting ModuleNotFoundError: No module named 'macrobond_api_constants' although the package seems to be installed correctly. I checked using conda list command.

在此处输入图片说明

https://pypi.org/project/macrobond-api-constants/

The instruction says this should be imported using import macrobond_api_constants

I tried to import using both Spyder and PyCharm . Any idea how to fix this?

In pycharm import libraries exist in different way. You can try this

1. Open PyCharm .

2. go to File -> settings -> Project:test(test means your project name) -> select project interpretor -> click add button

在此处输入图片说明

3. after clicking add button and search the library which you want to install then install it.

finally run the program.

Thank you everyone that wanted to help me with this issue. I contacted lib authors (Macrobond) saying I cannot access library and turns out there was something that they messed. An update has been just released couple days ago. Library is now accessible and works pretty well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM