plotly / dash-component-boilerplate

Get started creating your own Dash components here.
266 stars 182 forks source link

Error in installing BoilerPlate #81

Closed ChaksUdacity closed 4 years ago

ChaksUdacity commented 4 years ago

Executing: venv/bin/python -m dash.development.component_generator ./src/lib/components examplecomp -p package-info.json --r-prefix 'dc' Traceback (most recent call last): File "/Users/admin/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/Users/admin/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/admin/Desktop/BoilerPlate/examplecomp/venv/lib/python3.6/site-packages/dash/development/component_generator.py", line 14, in import yaml ModuleNotFoundError: No module named 'yaml' post_gen_project command failed: venv/bin/python -m dash.development.component_generator ./src/lib/components examplecomp -p package-info.json --r-prefix 'dc' ERROR: Stopping generation because post_gen_project hook script didn't exit successfully Hook script failed (exit status: 1)

pieroliviermarquis commented 4 years ago

I cloned the boilerplate and inlcuded pyaml in the requirements.txt and it fixed that issue.

BenMacKenzie commented 4 years ago

this should be an easy fix....

truemerrill commented 4 years ago

I cloned the boilerplate and inlcuded pyaml in the requirements.txt and it fixed that issue.

Can you specifically tell me what you did? I cant seem to me able to get this to work. To those at Plotly -- this is breaking your component boilerplate tool.

BenMacKenzie commented 4 years ago

i also had to edit setup.py, the path to package.json is wrong (i.e. it is actually in the same directory as setup.py).

inlytica commented 4 years ago

I added pyaml to the requirement.txt file. But, when I look at the setup.py file it looks as if the path is correct? with open(os.path.join('{{cookiecutter.project_shortname}}', 'package.json')) as f: package = json.load(f)

The error I am receiving now is:
Executing: venv\Scripts\python -m dash.development.component_generator ./src/lib/components example_component 'REQUIRED$' is not recognized as an internal or external command, operable program or batch file.

I see https://github.com/plotly/dash-component-boilerplate/issues/74 but no fix so far.

The above error occurs on a Windows machine. On Ubuntu, updating the requirement.txt file with pyaml works.

inlytica commented 4 years ago

@foosa

Can you specifically tell me what you did? I cant seem to me able to get this to work. To those at Plotly -- this is breaking your component boilerplate tool.

Fork the repository and then edit: /dash-component-boilerplate/{{cookiecutter.project_shortname}}/requirements.txt

image

Alternatively, you can use cookiecutter with my repository:

cookiecutter https://github.com/ghavranek/dash-component-boilerplate

As I referenced above though, there still appears to be an issue with Windows.

ishto7 commented 4 years ago

This worked out for me on Windows. Thanks @ghavranek

alexcjohnson commented 4 years ago

Merged #86 to fix the yaml dep with the newer dash install syntax. #78 will fix the package.json path, I'll leave this issue open until that gets merged.

alexcjohnson commented 4 years ago

Thanks all - closing, as #78 addressed the pieces unique to this issue. #87 should fix the windows problem by bringing in the latest dash including the fix from @stevej2608