cdgriffith / Box

Python dictionaries with advanced dot notation access
https://github.com/cdgriffith/Box/wiki
MIT License
2.64k stars 107 forks source link

ModuleNotFoundError: No module named 'box' #212

Closed kwalkerk closed 3 years ago

kwalkerk commented 3 years ago

I get the following error when I have this line in my code: from box import Box

ModuleNotFoundError: No module named 'box'

I've installed on RasPi Zero using pip3 install box. Also tried the regular pip install box.

Am running Python 3 3.7.3

Am I missing something obvious?

Thanks, Ken

cdgriffith commented 3 years ago

pip install python-box

box is reserved or something and couldn't get that name on pypi, so have to type out python-box for the install.

kwalkerk commented 3 years ago

I did that. No joy. Same error message

Sent from my iPhone

On Sep 26, 2021, at 4:47 PM, Chris Griffith @.***> wrote:

 pip install python-box

box is reserved or something and couldn't get that name on pypi, so have to type out python-box for the install.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

cdgriffith commented 3 years ago

When running python, are you calling python3 and did pip3 install python-box?

kwalkerk commented 3 years ago

Yes to both

Sent from my iPhone

On Sep 26, 2021, at 7:28 PM, Chris Griffith @.***> wrote:

 When running python, are you calling python3 and did pip3 install python-box?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

cdgriffith commented 3 years ago

Can you paste the full output of:

pip3 install --upgrade python-box
python3 -c "import box" 
kwalkerk commented 3 years ago

Here’s the output:

$ pip3 install --upgrade python-box Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already up-to-date: python-box in ./.local/lib/python3.7/site-packages (5.4.1) $ python3 -c "import box" $

This lead me to the solution. The program I run must be run under “sudo”. When I installed the package I did not use “sudo pip3 install —upgrade python-box”. Once I installed it that way, all was well.

Sorry to have wasted your time with my ignorance.

Thanks for your quick help!

On Sep 26, 2021, at 8:06 PM, Chris Griffith @.***> wrote:

Can you paste the full output of:

pip3 install --upgrade python-box python3 -c "import box" — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cdgriffith/Box/issues/212#issuecomment-927399336, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXIYZJHEOLWI57CSKB5D3UD6YQTANCNFSM5EZFGNXQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

cdgriffith commented 3 years ago

No problem at all, glad it's working for you now!

d1c2s3 commented 5 months ago

from utils.prior_box import PriorBox ModuleNotFoundError: No module named 'utils.prior_box' Can you help me figure it out, thanks!

cdgriffith commented 5 months ago

@d1c2s3 that is some other library, not this Box