Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ployly module not found error. #28

Closed
BradRR opened this issue Mar 17, 2020 · 5 comments
Closed

ployly module not found error. #28

BradRR opened this issue Mar 17, 2020 · 5 comments

Comments

@BradRR
Copy link

BradRR commented Mar 17, 2020

Hi, i'm quite new to this but have been having problems getting anything to run as any example i run comes up with ModuleNotFoundError: No module named 'plotly'.
I have installed various versions of plotly to try and get it to work but it hasn't. Any help would be appreciated.

Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.

= RESTART: /Users/bradleyrelyea/Desktop/AeroSandbox-1.1.5/casvlm1_conventional_analysis_alpha_sweep.py
Traceback (most recent call last):
File "/Users/bradleyrelyea/Desktop/AeroSandbox-1.1.5/casvlm1_conventional_analysis_alpha_sweep.py", line 3, in
from aerosandbox import *
File "/Users/bradleyrelyea/Desktop/AeroSandbox-1.1.5/aerosandbox/init.py", line 1, in
from .aerodynamics import *
File "/Users/bradleyrelyea/Desktop/AeroSandbox-1.1.5/aerosandbox/aerodynamics/init.py", line 1, in
from .casvlm1 import *
File "/Users/bradleyrelyea/Desktop/AeroSandbox-1.1.5/aerosandbox/aerodynamics/casvlm1.py", line 1, in
from .aerodynamics import *
File "/Users/bradleyrelyea/Desktop/AeroSandbox-1.1.5/aerosandbox/aerodynamics/aerodynamics.py", line 1, in
from ..geometry import *
File "/Users/bradleyrelyea/Desktop/AeroSandbox-1.1.5/aerosandbox/geometry.py", line 1, in
import plotly.express as px
ModuleNotFoundError: No module named 'plotly'

@peterdsharpe
Copy link
Owner

Hey @BradRR ,

Thanks for the report! This seems like you're having a problem more generally with getting Python packages to import.

To see if this is an AeroSandbox-specific issue, try importing plotly in a new python terminal - if it also fails, this is a broader issue.

import plotly

Can let me know what the result of this is, and can you confirm that you have pip-installed AeroSandbox?

@BradRR
Copy link
Author

BradRR commented Mar 17, 2020

Thanks,
The issue does seem like a wider problem as when I try import plotly it comes up with the same error. I can confirm that i have pip-installed AeroSandbox. I will try and look for a solution to fixing plotly.

import plotly
Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import plotly
ModuleNotFoundError: No module named 'plotly'

@peterdsharpe
Copy link
Owner

Sounds good - good luck!

@KikeM
Copy link
Contributor

KikeM commented Mar 17, 2020

Try doing

pip install plotly -I

It will reinstall it ignoring what's already installed.

@BradRR
Copy link
Author

BradRR commented Mar 17, 2020

I have found that the problem is that the import directory is not including pip. I found this and I'm not sure it's entirely correct. I tried importing other modules from the pip list and it wont do that either.
Thank you for helping, I understand that this Isn't a problem with aerosandbox.

import pkgutil
search_path = ['.'] # set to None to see all modules importable from sys.path
all_modules = [x[1] for x in pkgutil.iter_modules(path=search_path)]
print(all_modules)

Gives the reply

['aerosandbox', 'aerosandbox_legacy_v0', 'casvlm1_conventional_analysis_alpha_sweep', 'examples', 'setup', 'test']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants