peterdsharpe / AeroSandbox

Aircraft design optimization made fast through computational graph transformations (e.g., automatic differentiation). Composable analysis tools for aerodynamics, propulsion, structures, trajectory design, and much more.
https://peterdsharpe.github.io/AeroSandbox/
MIT License
741 stars 119 forks source link

ployly module not found error. #28

Closed BradRR closed 4 years ago

BradRR commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Sounds good - good luck!

KikeM commented 4 years ago

Try doing

pip install plotly -I

It will reinstall it ignoring what's already installed.

BradRR commented 4 years ago

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']