簡體   English   中英

我在 ubuntu 18.04 上使用 pycharm 編譯我的 py 項目時遇到問題

[英]I'm having trouble with compiling my py project using pycharm on ubuntu 18.04

這是我的代碼:

    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)

這是我每次嘗試編譯時都會遇到的錯誤:

/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

Python 解釋器似乎在編譯代碼時面臨挑戰,請確保在您的系統中設置了正確的 Python3 路徑而不是 Python2。 參考這里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM