[Errno 2] File o directory non esistente: '/usr/lib/python2.7/dist-packages/plotly/offline/plotly.min.js
<a class="star-off" href="#">favorite</a>
<div class="favoritecount"><b></b></div>
</div>
actually I don't know if this is the right place where to ask this question, but maybe someone could help.
I'm exploring the plotly library through the python API
Since some months it is possible to use plotly also offline without being registered.
I noticed a difference during the installation of plotly in python
1. aptitute python-plotly
2. pip install plotly
with the pip installation all works fine.
However, with the python-plotly installation, during the running of some script, there are some issues:
[Errno 2] File o directory non esistente:
'/usr/lib/python2.7/dist-packages/plotly/offline/plotly.min.js' See log
for more details
and effectively:
ls /usr/lib/python2.7/dist-packages/plotly/offline/
__init__.py __init__.pyc offline.py offline.pyc
with the pip installation the file is correctly installed and therefore there are not any problems.
I have experienced the same problem on debian stable, testing and unstable machines.
I have already opened an issue on the ploty repository on github
Someone has an idea?
Thanks
<div class="post-taglist grid gs4 gsy fd-column">
<div class="grid ps-relative d-block">
<a href="/questions/tagged/python" class="post-tag js-gps-track" title="show questions tagged 'python'" rel="tag">python</a> <a href="/questions/tagged/plot" class="post-tag js-gps-track" title="show questions tagged 'plot'" rel="tag">plot</a> <a href="/questions/tagged/debian" class="post-tag js-gps-track" title="" rel="tag">debian</a> <a href="/questions/tagged/pip" class="post-tag js-gps-track" title="" rel="tag">pip</a> <a href="/questions/tagged/plotly" class="post-tag js-gps-track" title="show questions tagged 'plotly'" rel="tag">plotly</a>
</div>
</div>
<div class="mb0 ">
<div class="mt16 pt4 grid gs8 gsy fw-wrap jc-end ai-start">
<div class="grid--cell mr16" style="flex: 1 1 100px;">
<div class="post-signature owner grid--cell">
</div>
</div>
</div>
<div class="post-layout--right">
<div id="comments-36917608" class="comments js-comments-container dno">
<ul class="comments-list js-comments-list" data-remaining-comments-count="0" data-canpost="false" data-cansee="true" data-comments-unavailable="false" data-addlink-disabled="true">
</ul>
</div>
<div id="comments-link-36917608" data-rep="50" data-anon="true">
<a class="js-add-link comments-link disabled-link " title="Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.">add a comment</a><span class="js-link-separator dno"> | </span>
<a class="js-show-link comments-link dno" title="expand to show all comments on this post" href="#" onclick=""></a>
</div>
</div> </div>
<a name="tab-top"></a>
<div id="answers-header">
<div class="subheader answers-subheader">
<h2 data-answercount="1">
1 Answer
<span style="display:none;" itemprop="answerCount">1</span>
</h2>
<div>
</div>
</div>
</div>
</div>
As explained in the github issue linked above, the Debian [and Ubuntu] version doesn't include the minified js file due to licensing issues.
Quick fix, copy the file at https://raw.githubusercontent.com/plotly/plotly.js/master/dist/plotly.min.js to the location specified in the error message:
/usr/lib/python2.7/dist-packages/plotly/offline/plotly.min.js
</div>
<div class="grid mb0 fw-wrap ai-start jc-end gs8 gsy">
<div class="grid--cell mr16" style="flex: 1 1 100px;">
<div class="post-signature grid--cell fl0">
</div>
</div>
<div class="post-layout--right">
<div id="comments-44480423" class="comments js-comments-container dno">
<ul class="comments-list js-comments-list" data-remaining-comments-count="0" data-canpost="false" data-cansee="true" data-comments-unavailable="false" data-addlink-disabled="true">
</ul>
</div>
<div id="comments-link-44480423" data-rep="50" data-anon="true">
<a class="js-add-link comments-link disabled-link " title="Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.">add a comment</a><span class="js-link-separator dno"> | </span>
<a class="js-show-link comments-link dno" title="expand to show all comments on this post" href="#" onclick=""></a>
</div>
</div> </div>
Your Answer
<script>
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
</script>
<div style="position: relative;">
<div class="wmd-container">
<div id="wmd-button-bar" class="wmd-button-bar btr-sm"><ul id="wmd-button-row" class="wmd-button-row"><li id="wmd-bold-button" class="wmd-button" style="left: 0px;"><span style="background-position: 0px -20px;"></span></li><li id="wmd-italic-button" class="wmd-button" style="left: 25px;"><span style="background-position: -20px -20px;"></span></li><li id="wmd-spacer1" class="wmd-spacer" style="left: 50px;"><span style="background-position: -40px -20px;"></span></li><li id="wmd-link-button" class="wmd-button" style="left: 75px;"><span style="background-position: -40px -20px;"></span></li><li id="wmd-quote-button" class="wmd-button" style="left: 100px;"><span style="background-position: -60px -20px;"></span></li><li id="wmd-code-button" class="wmd-button" style="left: 125px;"><span style="background-position: -80px -20px;"></span></li><li id="wmd-image-button" class="wmd-button" style="left: 150px;"><span style="background-position: -100px -20px;"></span></li><li id="wmd-spacer2" class="wmd-spacer" style="left: 175px;"><span style="background-position: -120px -20px;"></span></li><li id="wmd-olist-button" class="wmd-button" style="left: 200px;"><span style="background-position: -120px -20px;"></span></li><li id="wmd-ulist-button" class="wmd-button" style="left: 225px;"><span style="background-position: -140px -20px;"></span></li><li id="wmd-heading-button" class="wmd-button" style="left: 250px;"><span style="background-position: -160px -20px;"></span></li><li id="wmd-hr-button" class="wmd-button" style="left: 275px;"><span style="background-position: -180px -20px;"></span></li><li id="wmd-spacer3" class="wmd-spacer" style="left: 300px;"><span style="background-position: -200px -20px;"></span></li><li id="wmd-undo-button" class="wmd-button" style="left: 325px;"><span style="background-position: -200px -20px;"></span></li><li id="wmd-redo-button" class="wmd-button" style="left: 350px;"><span style="background-position: -220px -20px;"></span></li><li class="wmd-spacer wmd-spacer-max"></li></ul></div>
<div class="js-stacks-validation">
<div class="ps-relative">
<textarea id="wmd-input" class="wmd-input wz-element s-input bar0" name="post-text" cols="92" rows="15" tabindex="101" data-wz-state="8" data-min-length=""></textarea>
</div>
<div class="s-input-message mt4 d-none js-stacks-validation-message"></div>
</div>
</div>
</div>
<div class="fl" style="margin-top: 8px; height:24px;"> </div>
<div id="draft-saved" class="draft-saved community-option fl" style="margin-top: 8px; height:24px; display:none;">draft saved</div>
<div id="draft-discarded" class="draft-discarded community-option fl" style="margin-top: 8px; height:24px; display:none;">draft discarded</div>
<div id="wmd-preview" class="wmd-preview"></div>
<div></div>
<div class="edit-block">
<input id="fkey" name="fkey" type="hidden" value="14131831de5e824c00d539a1f61154d9af04d5ac20d2c9913bc096ff942b5035">
<input id="author" name="author" type="text">
</div>
<div style="position: relative;">
<div class="form-item new-post-login">
<div class="new-login-form">
<div class="new-login-left">
<h3>Sign up or <a id="login-link" href="/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f36917608%2fplotly-installation-difference-from-python-plotly-and-pip-install-plotly-debian%23new-answer">log in</a></h3>
<script>
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
</script>
<div class="preferred-login google-login" data-ga="["sign up","Sign Up Started - Google","New Post",null,null]">
<svg aria-hidden="true" class="svg-icon native iconGoogle" width="18" height="18" viewBox="0 0 18 18"><g><path d="M16.51 8H8.98v3h4.3c-.18 1-.74 1.48-1.6 2.04v2.01h2.6a7.8 7.8 0 0 0 2.38-5.88c0-.57-.05-.66-.15-1.18z" fill="#4285F4"></path><path d="M8.98 17c2.16 0 3.97-.72 5.3-1.94l-2.6-2a4.8 4.8 0 0 1-7.18-2.54H1.83v2.07A8 8 0 0 0 8.98 17z" fill="#34A853"></path><path d="M4.5 10.52a4.8 4.8 0 0 1 0-3.04V5.41H1.83a8 8 0 0 0 0 7.18l2.67-2.07z" fill="#FBBC05"></path><path d="M8.98 4.18c1.17 0 2.23.4 3.06 1.2l2.3-2.3A8 8 0 0 0 1.83 5.4L4.5 7.49a4.77 4.77 0 0 1 4.48-3.3z" fill="#EA4335"></path></g></svg> Sign up using Google
</div>
<div class="preferred-login facebook-login" data-ga="["sign up","Sign Up Started - Facebook","New Post",null,null]">
<svg aria-hidden="true" class="svg-icon iconFacebook" width="18" height="18" viewBox="0 0 18 18"><path d="M1.88 1C1.4 1 1 1.4 1 1.88v14.24c0 .48.4.88.88.88h7.67v-6.2H7.46V8.4h2.09V6.61c0-2.07 1.26-3.2 3.1-3.2.88 0 1.64.07 1.87.1v2.16h-1.29c-1 0-1.19.48-1.19 1.18V8.4h2.39l-.31 2.42h-2.08V17h4.08c.48 0 .88-.4.88-.88V1.88c0-.48-.4-.88-.88-.88H1.88z" fill="#3C5A96"></path></svg> Sign up using Facebook
</div>
<div class="preferred-login stackexchange-login" data-ga="["sign up","Sign Up Navigation","New Post",null,null]">
<svg aria-hidden="true" class="svg-icon native iconLogoGlyphXSm" width="18" height="18" viewBox="0 0 18 18"><g><path fill="#BCBBBB" d="M14 16v-5h2v7H2v-7h2v5z"></path><path d="M5 15v-2h8v2H5zM12.09.72l4.5 6.06-1.2.9-4.51-6.06 1.21-.9zM8.34 4.3l.97-1.16 5.8 4.83-.96 1.16-5.8-4.83zm-1.9 3.36l.64-1.37 6.85 3.19-.63 1.37-6.85-3.2zM5.4 11.39l.38-1.67 7.42 1.48-.22 1.46-7.58-1.27z" fill="#F48024"></path></g></svg> Sign up using Email and Password
</div>
</div>
<input type="hidden" name="manual-openid" class="manual-openid">
<input type="hidden" name="use-facebook" class="use-facebook" value="false">
<input type="hidden" name="use-google" class="use-google" value="false">
<input type="button" class="submit-openid" value="Submit" style="display:none">
<div class="new-login-right">
<h3>Post as a guest</h3>
<div class="form-item">
<table>
<tbody><tr>
<td class="vm">
<div>
<label for="display-name">Name</label>
<input id="display-name" name="display-name" type="text" size="30" maxlength="30" value="" tabindex="105">
</div>
<div>
<label for="m-address">Email</label>
<input id="m-address" name="m-address" type="email" size="30" maxlength="100" value="" tabindex="106" placeholder="required, but never shown">
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
</div>
</div>
<script>
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36917608%2fplotly-installation-difference-from-python-plotly-and-pip-install-plotly-debian%23new-answer', 'question_page');
}
);
</script>
<noscript>
<h3>Post as a guest</h3>
<div class="form-item">
<table>
<tr>
<td class="vm">
<div>
<label for="display-name">Name</label>
<input id="display-name" name="display-name" type="text" size="30" maxlength="30" value="" tabindex="105">
</div>
<div>
<label for="m-address">Email</label>
<input id="m-address" name="m-address" type="email" size="30" maxlength="100" value="" tabindex="106" placeholder="required, but never shown" />
</div>
</td>
</tr>
</table>
</div>
</noscript>
</div>
<div class="form-submit cbt grid gsx gs4">
<button id="submit-button" class="grid--cell s-btn s-btn__primary" type="submit" tabindex="120" autocomplete="off">
Post Your Answer
Discard
By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
<h2 class="bottom-notice" data-loc="1">
Not the answer you’re looking for? Browse other questions tagged python plot debian pip plotly or ask your own question.