Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python/ Beeware
#1
I have a problem with the 'toga import':

import toga
ModuleNotFoundError: No module named 'toga'
C:\beeware-tutorial\helloworld\src\helloworld\app.py", line 4, in <module>

I have the following path in my environment variables
C:\Users\Sybert\AppData\Roaming\npm;
C:\Users\Sybert\AppData\Local\Programs\Python\Python37\Python.exe
Can someone help?
Reply
#2
That package is fairly old (last update: Aug 2017) however I had no problem installing into python 3.8.1
import does not install, to install use:
pip install toga
from command line only.
If you are using a virtual environment, activate prior to installing.
Now you should be able to install
Reply
#3
thanks for answering! (I'm a novice trying to learn to write an app)
I ran pip install, but the toga package is already satisfied in the Beeware tutorial.
I thought that the package could not be found because of the 'path info'?
rgds
Reply
#4
do you have more than one version of python loaded?
each version has it's own pip.
try pip -V to see if the version you are using is matched to the python you are using
python -V
will show python version.
if python is version 3 or newer, and pip -V shows version 2...,
use: pip3 install toga

also see: https://beeware.org/project/projects/libraries/toga/
I couldn't find an example, perhaps the import statement is different that package name.

--------------------
EDIT I just noticed documentation here: https://toga.readthedocs.io/en/latest/
there's a user guide in there.
Reply
#5
I have Python 3.7 and pip 20.0.2
I uninstalled 3.8 (Beeware recommendation)
Toga is installed in the beeware-tutorial site-package,
Toga does import from the command prompt but not from Idle Python directory
Reply
#6
the thing to look for when you issue a pip -V command is the version of python pip is using.
if python -V shows 3.7, your environment paths are not correct for python 3.8 (you need to check the environment path option when installing). If this the case, unless your very comfortable with changing OS environment paths would be to remove and reinstall python 3.8.
see snippsat's installation instructions here: https://python-forum.io/Forum-Python-Ins...-Execution
Reply
#7
I'm also having a problem running Briefcase Dev, it only loads partially
perhaps some advice?
I have three choices:
persevere with 'Beeware'
try 'Kivy'
or learn Java and carry on from there
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020