I am trying to download github dataset from here:
https://raw.githubusercontent.com/heyunh2015/PARADE_dataset/main/PARADE_test.txt
using a windows machine, and the anaconda host to play jupyter notebook, I am trying to directly download it in the machine using the following command:
!wget https://raw.githubusercontent.com/heyunh2015/PARADE_dataset/main/PARADE_test.txt
However, it is giving me the following error:
'wget' is not recognized as an internal or external command, operable
program or batch file.
Then I tried again after the following command:
!pip install wget
still the same error.
Next, I tried curl, and the error went away, but I am unable to access my downloaded file either through code (the file doesn't exist) or using GUI (doesn't show up in the current working directory).
What to do?
I got my answer.
import wget
url = "<source>"
wget.download(url, '<destination>')
wget not working in annaconda jupyter notebook - Windows. Alternative?
python's standard library has function for downloading files, called urlretrieve inside urllib.request. Simple usage example
import urllib.request
urllib.request.urlretrieve("https://raw.githubusercontent.com/heyunh2015/PARADE_dataset/main/PARADE_test.txt","PARADE_test.txt")
Explanation: 2 arguments are provided, URL and filename. Note that in this form this does not report progress. You need to wait until it finishes. If you must have see linked docs for discussion of 3rd argument to urllib.request.urlretrieve
Related
I recently installed wget, both from https://eternallybored.org/misc/wget/ and also using
pip install wget
I put the wget.exe file in C:\Windows\System32, and when I type
wget -h
into the command line, it runs perfectly fine, and returns the help list for wget. However, when I run wget from jupyter notebooks using the code below,
!wget https://raw.githubusercontent.com/MicrosoftDocs/mslearn-introduction-to-machine-learning/main/Data/ml-basics/grades.csv
df_students = pd.read_csv('https://raw.githubusercontent.com/MicrosoftDocs/mslearn-introduction-to-machine-learning/main/Data/ml-basics/grades.csv',delimiter=',',header='infer')
df_students.head()
I get: 'wget' is not recognized as an internal or external command, operable program or batch file.
I have done quite some research now and none of the solutions seem to be working for me. I have a slight suspicion it might have to do with my system PATH variables but I can't seem to understand why Jupyter Notebooks cannot find wget.
Use curl instead:
!curl https://raw.githubusercontent.com/MicrosoftDocs/mslearn-introduction-to-machine-learning/main/Data/ml-basics/grades.csv
df_students = pd.read_csv('https://raw.githubusercontent.com/MicrosoftDocs/mslearn-introduction-to-machine-learning/main/Data/ml-basics/grades.csv',delimiter=',',header='infer')
df_students.head()
The Output:
Name,StudyHours,Grade
Dan,10,50
Joann,11.5,50
Pedro,9,47
Rosie,16,9
.....
As part of my master thesis, I am trying to use the API shared by Matthieu Nadini on OSF [link to study:https://osf.io/xnj3k/?view_only=319a53cf1bf542bbbe538aba37916537] to retrieve NFT data from OpenSea, Atomic Hub and The Graph.
As explained in the ReadME pdf, I downloaded the Install_packages.ipynb and ran it in my Jupyter Notebook (I am using Anaconda). I also downloaded the API_.py files. I then opened an Anaconda cmd prompt and I ensured that the API files were in the working directory.
When I try to run an API with the following command:
python API_TheGraph_Cryptokitties.py 2021-01-01 2021-02-01
I get an message that the syntax is incorrect. I have tried using "" or '' but it had no effect.
I then receive the following:
output from Anaconda cmd prompt
Your help would be much appreciated as I do not understand why the command is not executed.
Thank you in advance!
François
whenever I type, for an example: pip install aiohttp==3.7.3, it gives me: /usr/bin/env: ‘./python3’: No such file or directory is there any way to fix it? (The error is in REPLIT)
I had problems with using aiohttp in REPLIT, I tried uninstalling package files. I "reinstalled" packages, such as "aiohttp" after doing the problem referred to the title popped up in the console.
I ran into this error as well and haven't been able to solve it.
In the meantime, I use python3 -m instead and it works:
python3 -m <module-name> <args>
Well, go to .replit and delete the Variable called hidden = ["venv", ".config", "**/__pycache__", "**/.mypy_cache", "**/*.pyc"]
after deleting, go to the file directly and download the module to your computer, then upload it to the file it's not in.
I hope this works,
-JKID_Tech
P.S. I tried this IT WORKS if you get python from your computer then go to the python files or try to find it on the internet for example PyPI
I have downloaded a python package called CAMeL tools for Arabic NLP and now I have to install its data packages. It says to run the command
camel_data full
but I'm not sure how to do it. Should I just use
py camel_data full
? When I do this, it gives me
C:\Users\delar\AppData\Local\Programs\Python\Python39\python.exe: can't open file 'C:\Users\delar\AppData\Local\Programs\Python\Python39\Lib\site-packages\camel_data': [Errno 2] No such file or directory
and when I do not use py and just write camel_data full in the command prompt, it says
'camel_data' is not recognized as an internal or external command,
operable program or batch file.
try camel_data light or camel_data full without invoking python or py
I have never used this in my life and I simply did:
pip install camel-tools
Then once it was done installing I did:
camel_data full
And that worked.
You can also check the documentation on how to install the data from here: https://camel-tools.readthedocs.io/en/latest/getting_started.html
I have installed the K4W branch of the open kinect project on Linux 11.10 from https://github.com/renewagner/libfreenect/tree/k4w-wip . I can navigate to the directory libfreenect/build and run the command:
sudo bin/glview
and the output works correctly.
I have also installed the Python wrappers from libfreenect/wrappers/python and I can import the libraries successfully. However if I run a simple code such as
import freenect
freenect.sync_get_depth()
Which I saved as kinect1.py and then ran using the command sudo kinect1.py
I get the following error:
Error: Invalid Index[0]
Error: Can't open device 1.) Is it plugged in? 2.) Read README
However, I can go straight back to running the glview example and it still work find. So I must be missing something with the Python wrapper implementation. I hope someone can help.