We use the online installation method to operate directly in sublime. Here’s the difference between text2 and Text3
1. Call the console, Ctrl + “+” + “~”, or view – &> show console. Input on console
Text2 input:
import urllib2,os;pf='Package Control.sublime package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
The built-in Python versions in Text3 are different, so the package of urllib2 is not suitable for Text3. Text3 input:
import urllib.request,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler()));open(os.path.join(ipp,pf),'wb').write(urllib.request.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
The console runs out; then restart the editor.
2. There are at most two columns at the bottom of the preferences in the navigation bar. Package setting is in package control. This proves that it has just been successful. Click package control . The interface is as follows, select install page. wait until the lower left corner is loaded.
The page will automatically jump out of the following content, enter Emmet and download. Wait until the load is complete.
Finally, after loading, the page changes to this:
Similar Posts:
- [Solved] HTTP Error 301: The HTTP server returned a redirect error that would lead to an infinite loop.
- Python3 Use urlliburlopen error EOF occurred in violation of protocol (_ssl.c:841)
- Sublime Text3: How to Solve Error “There are no packages available for installation”
- Differences of urllib, urllib2, httplib and httplib2 libraries in Python
- How to Solve Python Error: “HTTP Error 403: Forbidden”
- Interface automation (8): an error is reported during interface testing sslerror: Certificate verify failed
- Python3 urlopen() TypeError: can’t convert ‘bytes’ object to str im…
- No module named ‘urllib.request’; ‘urllib’ is not a package
- Python crawling picture prompt urllib.error.httperror: http error 403: forbidden solution
- You-get Warning urllib.error.URLError: