python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.39k stars 583 forks source link

issue when importing eel on Python 3.8.5 #400

Open felini69 opened 3 years ago

felini69 commented 3 years ago

Describe the problem I install last version of eel. write few line of code and start project. cant import eel. I have issue with importing eel. I have Python3.8.5 version on my Windows PC.

text from my CMD import eel ModuleNotFoundError: No module named 'eel'

there is my code import eel import pyowm

city = "Batumi, Georgia"

owm = pyowm.OWM("b74a1f6f227b9d3e307f8eeef5f776c4") mgr = owm.weather_manager()

observation = mgr.weather_at_place(city) w = observation.weather

temp = w.temperature("celsius")["temp"]

print("In " + city + "right now is " + stp(temp) + "temperature")

Code snippet(s) image image

import eel

...
<html>
   ...
</html>

Desktop (please complete the following information):

Smartphone (please complete the following information):

samuelhwilliams commented 3 years ago

I feel quite confident saying this isn't a bug - have you done pip install eel for Python 3.8.5? Are you using a virtual environment that doesn't have Eel installed?

felini69 commented 3 years ago

I feel quite confident saying this isn't a bug - have you done pip install eel for Python 3.8.5? Are you using a virtual environment that doesn't have Eel installed?

@samuelhwilliams thx for you answer. I instaled last version of eel. Eel 0.14.0. Is there any other version for Python 3.8.5? image

samuelhwilliams commented 3 years ago

No, that's the correct version. What I think is happening is that you have installed Eel into a different Python interpreter/environment than the one you're trying to import eel from. That's really the only explanation right now that springs to mind.

What happens if you run the following in a terminal:

pip install eel
python -c 'import eel; print(eel)'
felini69 commented 3 years ago

No, that's the correct version. What I think is happening is that you have installed Eel into a different Python interpreter/environment than the one you're trying to import eel from. That's really the only explanation right now that springs to mind.

What happens if you run the following in a terminal:

pip install eel
python -c 'import eel; print(eel)'

you mean like this? or enything else? image

samuelhwilliams commented 3 years ago

Looks like you may need to use double quotes rather than the single quotes I provided, but yes, essentially that's what I mean.

aprilahijriyan commented 3 years ago

check if pip is for python 3. use the option "-V" e.g. "pip -V"

felini69 commented 3 years ago

check if pip is for python 3. use the option "-V" e.g. "pip -V"

here is screen image

felini69 commented 3 years ago

Looks like you may need to use double quotes rather than the single quotes I provided, but yes, essentially that's what I mean.

here is creen image

aprilahijriyan commented 3 years ago

try python main.py ?

felini69 commented 3 years ago

try python main.py ?

I try. It's not work on CMD and in jupyter. but vork in python IDE (( how can I fix this ishue? image

felini69 commented 3 years ago

Looks like you may need to use double quotes rather than the single quotes I provided, but yes, essentially that's what I mean.

It's not work in CMD and Jupyter but work in Python IDE (( can we fix this ishue? image

samuelhwilliams commented 3 years ago

Hi @felini69 - it's good that you can see Eel is working on your machine. This means the Python interpreter you're using in Jupyter is different from the one you've installed Eel in.

You will need to find the Python interpreter that Jupyter is using and install Eel in that. I can only really point you at Jupyter docs for that problem as I'm not so familiar. This isn't an Eel issue I'm afraid.