Oct-11-2016, 10:35 PM
So this is the problem I run into when I run my script, which is a .py file that I opened using IDLE, then I run the module (F5).
"
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
============== RESTART: /Users/harman/Desktop/Tumblr Script.py ==============
Traceback (most recent call last):
File "/Users/harman/Desktop/Tumblr Script.py", line 9, in <module>
import msvcrt as m
ImportError: No module named 'msvcrt'
>>>
"
I know that msvcrt is a microsoft file that I cannot use since I am running this on a mac, but I was wondering what I can do or change in the actual script that will allow me to run it on my macbook. Here are the first 20 or so lines of the script itself. I bolded the part which I think is causing the problem. All help is greatly appreciated since this is my first time running a script and really don't know anything about them in the first place. Thanks again! :D
"
import os
import time
import sys
from datetime import datetime
import fileinput
def cls():
os.system(['clear','cls'][os.name == 'nt'])
import msvcrt as m
def pause():
m.getch()
cls()
try:
import requests
except ImportError:
os.system('%USERPROFILE%\AppData\Local\Programs\Python\Python35-32\Scripts\pip3.5.exe install requests')
import requests
"
I also don't have the pip's on my computer and was wondering where I can get those. I tried installing them before but they told me I had an 'outdated location' and then sent me on a wild goose chase on this site: https://bootstrap.pypa.io/get-pip.py
And when I do get them, what do I type in for the ".exe" part of the file above? Thanks!
"
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
============== RESTART: /Users/harman/Desktop/Tumblr Script.py ==============
Traceback (most recent call last):
File "/Users/harman/Desktop/Tumblr Script.py", line 9, in <module>
import msvcrt as m
ImportError: No module named 'msvcrt'
>>>
"
I know that msvcrt is a microsoft file that I cannot use since I am running this on a mac, but I was wondering what I can do or change in the actual script that will allow me to run it on my macbook. Here are the first 20 or so lines of the script itself. I bolded the part which I think is causing the problem. All help is greatly appreciated since this is my first time running a script and really don't know anything about them in the first place. Thanks again! :D
"
import os
import time
import sys
from datetime import datetime
import fileinput
def cls():
os.system(['clear','cls'][os.name == 'nt'])
import msvcrt as m
def pause():
m.getch()
cls()
try:
import requests
except ImportError:
os.system('%USERPROFILE%\AppData\Local\Programs\Python\Python35-32\Scripts\pip3.5.exe install requests')
import requests
"
I also don't have the pip's on my computer and was wondering where I can get those. I tried installing them before but they told me I had an 'outdated location' and then sent me on a wild goose chase on this site: https://bootstrap.pypa.io/get-pip.py
And when I do get them, what do I type in for the ".exe" part of the file above? Thanks!