I am importing plotly.offline in my basic.py file, but when i run this basic.py in the platform-ide-terminal, an error comes up and says, ImportError: No module named plotly.offline.
I am sure plotly is pip installed. When i checked it in the default Terminal in my Mac,
pip show plotly
it reads,
Name: plotly
Version: 4.3.0
Summary: An open-source, interactive graphing library for Python
Home-page: https://plot.ly/python/
Author: Chris P
Author-email: chris#plot.ly
License: MIT
Location: /Users/Lorentz/opt/anaconda3/lib/python3.7/site-packages
Requires: retrying, six
Required-by: dash, chart-studio
My default python in Terminal is 3.7.
So i am trying to set the default python of my Atom to 3.7. I googled and my answers are suggesting to set it through Atom→Preferences→Open Config Folder, and open.atom/packages/script/lib/grammars/python.coffee. This is from the official site https://atom.io/packages/script
But my problem is, under packages, i can't locate script.
i then tried to locate it from top menu, still no luck.
Would anyone please tell me where to locate the python.coffee file? or where actually is this "script"?
Go here and search for script. When it is found click install. Or go here and click install.
There is a file named init.coffee in the home/.atom directory. I don't know of a python.coffee file.
Related
I can use the normal F2 rename variable functionality in regular python files in vscode. But not when editing python in a jupyter notebook.
When I press F2 on a variable in a jupyter notebook in vscode I get the familiar change variable window but when I press enter the variable is not changed and I get this error message:
No result. No result.
Is there a way to get the F2 change variable functionality to work in jupyter notebooks?
Here's my system info:
jupyter module version
(adventofcode) C:\git\leetcode>pip show jupyter
Name: jupyter
Version: 1.0.0
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
Home-page: http://jupyter.org
Author: Jupyter Development Team
Author-email: jupyter#googlegroups.org
License: BSD
Location: c:\users\johan\anaconda3\envs\adventofcode\lib\site-packages
Requires: ipykernel, qtconsole, nbconvert, jupyter-console, notebook, ipywidgets
Required-by:
Python version:
(adventofcode) C:\git\leetcode>python --version
Python 3.10.0
vscode version:
1.63.2 (user setup)
vscode Jupyter extension version (from the changelog in the extensions window):
2021.11.100 (November Release on 8 December 2021)
Notice that you put up a bug report in GitHub and see this issue: Renaming variables didn't work, the programmer replied:
Some language features are currently not supported in notebooks, but
we are making plans now to hopefully bring more of those online soon.
So please wait for this feature.
I am able to rename variables in one cell by:
Select the variable
Right click and choose "Change All Occurrences"
Change the variable name
Ctrl + F2 ~ Change All Occurrences
I installed plot.ly using conda and tried to use it in offline mode on Jupyterlab:
from plotly.offline import init_notebook_mode
init_notebook_mode(connected=True)
The Firefox developer console displays the following error after those statements:
ReferenceError: requirejs is not defined
I tried to manually put require.js into the folder with the notebook and into ...\anaconda3\pkgs\jupyter\nbextensions, it didn't work.
How do I solve this issue? How do I install require.js properly?
Versions:
Python 3.6.6
Plotly 3.4.2
Jupyterlab 0.35.4
Windows 10
Firefox 64.0.2
nodejs 10.15.0
Please see Yan Ulms answer: the plotly extension for Jupyter Lab is deprecated
Old answer:
You need to install the plotly extension for Jupyter Lab, as mentioned by #byouness.
A common pitfall in the installation is that you need to have a recent Node.js installation. This might be the cause of your error write EPROTO 1172:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:openssl\ssl\record\ssl3_record.c:252. Re-installing Node.js might be an easy fix.
Your company firewall might indeed be a problem. Because the installation of the extension uses NPM (node.je package manager), you should check Common proxy and networking problems for NPM. You might need to install the extension manually, by following the installation instructions for developers.
I definitely agree that the process is much more difficult than it should be. Installing it at my company was also a struggle. Good luck!
The JupyterLab readme on GitHub says that the #jupyterlab/plotly-extension is being deprecated. Please use the Plotly-supported jupyterlab-plotly. See the plotly.py README for more info.
I've tried unsuccessfully to get scip running with python. I'm using Yosemite (10.10.3), python 2.7 and have installed scip optimization suit (http://scip.zib.de/download.php?fname=scipoptsuite-3.1.1.tgz) with make.
I can start scip after the installation via the terminal.
sages-MBP:~ sage$ scip SCIP version 3.1.1 [precision: 8 byte] [memory: block] >[mode:optimized][LP solver: SoPlex 2.0.1] [GitHash: bade511]
But when I try to use import scip in python there appears the message
No module named scip
The same error message appears for from zibopt import scip
If I print the system path with print sys.path in python, the folder scipoptsuite-3.1.1/scip-3.1.1/bin is included where the file
scip-3.1.1.darwin.x86_64.gnu.opt.spx is situated.
Is it possible that the reason for the error message is that I haven't linked correctly necessary libraries?
Or which folders have to be included in the pythonpath to get scip working?
I Hope someone can help me out!
You need to install the python interface that comes with SCIP. Go to scip/interfaces/python/ and read the instructions in README and INSTALL. This interface is using Cython to communicate with the C-Code of SCIP.
make will only install the native Linux or Mac binaries/libraries.
The environment variable DYLD_LIBRARY_PATH needs to be set to contain the lib/ directory of the SCIPoptSuite installation (see comment by #саша)
I am using 32-bit Python 2.7. I believe I have successfully installed Scrapy and all the dependencies. When I type scrapy version in the cmd prompt, it shows the version. But when I try to scrape the home page of Wikipedia for testing, this is the output:
The last few lines go as follows :
C:\...\Python27\lib\site-packages\IPython\frontend,py:30: UserWarning: The top-level 'frontend' package has been deprecated. All its subpackages have been moved to the top 'IPython' level.
warn<"The top-level 'frontend' package has been deprecated.
In[1]:"
Note: I have installed IPython and its dependencies. And I have no idea what "frontend" and "deprecated" mean? Any idea of how to solve this? Thanks.
I am a relative newbie with Python and was trying to install wxPython 2.9 using Python 2.6. I did a build from source and then installed the package both being done in a non-standard (local) path. When I try and import wx (having provided the path to the installation folder in my environment variable), I get the following error message:
"ImportError:
libwx_gtk2u_xrc-2.9.so.1: cannot open
shared object file: No such file or
directory".
Can someone please tell me if I need to build gtk separately? And if yes, how do I go about doing it?
Add the directory containing the library given in the error to your ld search paths. See the ldconfig(8) man page for details.