I have python file i want to share it to my friends, but they are saying they cant download the file.
Is there any way that they can run the python file without downloading that file? They cant download .exe files also.
I tried using online compiler for python but as my file has tkinter and many modules, compilers are not able to run my file.Can i run the code which i have mentioned in google colab or jupyter notebook?
Please suggest me how to do this. I just want to demonstrate the app which i created.
Google Colaboratory should be able to solve your problem.
To install external libraries use !pip install <library_name> in any of the cell. And then use go on using colab notebook as one would use a Jupyter Notebook.
It even has option to share your colab notebook, so others would be able to execute the same code as you without having to download any files locally.
Ask to run '.py' extension in a Code Editor (eg. VSCode)
Or else just ask to run the '.exe' by downloading it. And then delete if not want to keep it.
Related
sorry for this really basic question: I installed the CMSmap program locally and now want to use it in my Jupyter notebook when writing my own code. What is the command to import this program in Jupyter?
I wanted to run the CMSmap tool over a list of URLs. I installed the tool according to the instructions on the website, but I can't run it in Jupyter.
I've recently moved the location of my git repo. All my standard Python scripts work just fine but for some reason my Jupyter notebooks can't even import any modules. I've re-cloned my repo to the original location and the notebooks run fine again.
I've tried searching the VS Code settings for something that resembles a working directory for Jupyter but no luck. Any ideas on what might be going on and how I could fix it?
For reference:
OS: Windows 10
VS Code: 1.53.2
Python extension: 2021.1.502429796
Jupyter extension: 2020.12.414227025
Edit:
I've been able to put a sticking plaster on this by using os.chdir() to select the new repo.
Got a small basic question. I use a Mac, and I used to work in .py files with Sublime 3. One of the things I liked was that when Sublime is closed, for a given file in a folder--if I'm looking for a bit of code--I could hit the spacebar and Macs open a quick preview of the .py document.
Now I'm working in Jupyter Notebook and saving everything as .ipynb files. Now I can't hit the spacebar and glance at files--I launch JN from the command land and it's far slower.
I suspect there are quicker ways to open .ipynb files in browser windows, but what I really want to know is is there a way to quickly preview those file contents from my desktop? Alternatively, is there a way to work in Jupiter Notebook but save the files as .py (and later seamlessly reopen in JN), such that I could still use the great old spacebar trick?
Thanks for you patience with a pretty small question :)
It's been a while since the last answer, but just in case anyone else is looking to use Mac Quicklook to preview Jupyter Notebooks .ipynb files, this app does the job:
Jupyter Notebook Viewer - https://github.com/tuxu/nbviewer-app
You can either download the app from that page or install using brew cask
brew cask install jupyter-notebook-viewer
If the preview is not working you should reload quicklook.
Just open a terminal windows and run. It worked for me on macOS High Sierra.
qlmanage -r
Now enjoy quicklook preview for Jupyter Notebook files :)
I had this same question at the weekend.
I came across two things:
a) this project on Github: https://github.com/jendas1/jupyter-notebook-quick-look
and
b) The Jupyter app which allows you to open Notebooks in Finder on the mac: https://github.com/jendas1/JupyterApp
Caveat - I book marked these, but due to other work I have not had time to download, install or test these.
If you do, please let me know how you get on!
As an update to the previous answers, I'd like to recommend nbviewer.js which is a client-side ipynb renderer. You can use it online at https://kokes.github.io/nbviewer.js/viewer.html
In case anyone wants to do the same on linux, you can check this out
nb-viewer which lets you preview Jupyter notebooks with a double click!
Update for the most recent version of MacOS (tested on macOS Big Sur v11.6) & newer brew versions:
To install Jupyter Notebook Viewer - https://github.com/tuxu/nbviewer-app follow these steps:
brew install --cask jupyter-notebook-viewer
Manually start /Applications/Jupyter Notebook Viewer.app using command + open (to allow a third-party app to be started)
qlmanage -r
I'm pretty new to the community, and new to python. I know the basics. But now I'm trying to download third party modules via pip but everything I do regarding pip displays an error. I know that pip comes with python seeing as the pip file is there.
I am running python 3.6 and windows 10. I have downloaded pip off the internet also but when I try to run the program it says already downloaded. The first time I ran it it said that it was downloading and successfully downloaded so I'm kind of lost.
Thanks!
Sounds like it's already properly installed. pip is a program called from a system terminal, not from a Python prompt. Open up a command prompt and type pip -h see what happens. If this does not print out the help page on how to use pip, and instead you get an error to the effect of:
"pip" is not recognized as an internal or external command, operable program or batch file
You then need to point Windows where to find the program (pip.exe) by adding your Python scripts folder C:\...\Python36-32\Scripts\ to your environment PATH variable. To do this, open the Start menu and search for "environment variables". Open the dialogue and find one named PATH (case doesn't matter). If it doesn't exist, create it. Edit the value and add the file path to the scripts folder to the end using ; as a separator.
As per your comment, if you are getting an access denied windows error this answer from another question may help you.
You need need to be sure either your powershell is being run as administrator, or by creating a virtual environment.
The Installing Packages docs have a great overview, and instructions.
https://packaging.python.org/installing/#use-pip-for-installing
I need to open a ipython notebook (.ipynb extension file) to look for some work done by a previous colleague. However, I do not have a knowledge of how the python structure works. Can someone guide me on what should be the easiest way to look at the file?
You'll need to install iPython, either on its own or as part of a prepackaged distribution such as Anaconda. You can then open iPython Notebook with your browser and find the notebook of your interest on your drive.