[英]I'm having trouble with compiling my py project using pycharm on ubuntu 18.04
this is my code:这是我的代码:
import math
q = input(print("enter the q"))
R = input(print("enter the R"))
n = 1
m = 1
dofpar = 2 * math.sin(m * 3.14159 / n)
U = (q ** 2 / (4 * 3.14159 * 8.8 * 10 ** (-12) * R)) * dofpar
for n in range(2, N):
for m in range(1, n - 1):
dofpar += 2 * math.sin(m * 3.14159 / n)
print(U)
and this is the error i face each time trying to compile:这是我每次尝试编译时都会遇到的错误:
/home/mohammad/PycharmProjects/untitled4/venv/bin/python /home/mohammad/PycharmProjects/p61h
/home/mohammad/PycharmProjects/untitled4/venv/bin/python: can't find '__main__' module in '/home/mohammad/PycharmProjects/p61h'
Process finished with exit code 1
It seems the Python interpreter is facing challenges in compiling your code, please make sure correct Python3 path is set in your system and not Python2. Python 解释器似乎在编译代码时面临挑战,请确保在您的系统中设置了正确的 Python3 路径而不是 Python2。 Refer here 参考这里
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.