I've been searching for it but could not find anything on the net on this topic.
When I'm working on a programm in python 3.5 which imports tkinter or pyglet I'm perfectly able to start it from the command line on my Linux Mint installation. As soon as I try to start it from pycharm or Visual Studio Code I get an error.
It is for tkinter:
Traceback (most recent call last): File "/home/b...", line 3, in <module>
import tkinter as tk
File "/usr/lib/python3.5/tkinter/__init__.py", line 35, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'
Both, the tkinter and the pyglet script, are working when they are started from idle3 (with F5).
Can anyone help me out?
Best
B.
i'm having the same issue. The problem lie with Linux Mint Software Manager. If your vs code is install via Software Manager, it will be install in Flatpak virtual sandbox. Just download and run vs code from its homepage will do.
Related
Absolute noob here, so I apologize in advance for stupid questions.
I'm running Windows 10, I've got Python 3.7.3 and I have...
Successfully installed pyglossary-3.2.1
But I cannot run PyGlossary from the command line or the tkinter GUI. If I run any of the following lines
python3 pyglossary.pyw --help
python3 pyglossary.pyw --ui=tk
python3 pyglossary.pyw --version
Nothing happens and I don't get any sort of error message. I've also tried...
python pyglossary.pyw --help
and I get...
Traceback (most recent call last):
File "pyglossary.pyw", line 30, in
from pyglossary import core # essential
File "C:\mypath\pyglossary\pyglossary.pyw", line 30, in
from pyglossary import core # essential
ImportError: cannot import name 'core' from 'pyglossary' (C:\mypath\pyglossary\pyglossary.pyw)
I've checked Windows Path variables, but I think everything's ok there, and I'm able to run other python stuff. Thanks in advance.
When importing PyGame using the interpreter it is successful. Using Geany it is not.
shows the error.
I have tried editing the shebang, renaming the file. making sure the PATH and version were correct, and that there were no missing Geany plugins.
import pygame
pygame.init()
Error in Geany:
Traceback (most recent call last):
File "moduleerror.py", line 3, in <module>
import pygame
ImportError: No module named pygame
I went into Build >> Set Build Commands and under Execute commands changed
python "%f"
to
python3 "%f"
This question has been asked a few times, but the remedy appears to complicated enough that I'm still searching for a user specific solution.
I recently installed Quandl module using pip command. Even after successful installation my python idle is still showing
Traceback (most recent call last):
File "F:\Python36\Machine Learning\01.py", line 3, in <module>
import Quandl
ModuleNotFoundError: No module named 'Quandl'
I have used import command in my code.
I am using python 3.6.1 version.
I am working on a windows 10 Desktop.
I have also tried re-installation of module.
You can better navigate to your python scripts folder and open a command window there and try pip3 install quandl .Hope this helps.
Please help to finish installation of PyQt.
So I think I successfully installed SPI and PyQt as it is mentioned in the reiverbankcomputing. (https://www.riverbankcomputing.com/software/pyqt/download)
(at least no errors where raised during installation).
However when in python shell I import PyQt, python does not recognize it:
>>> from PyQt4 import QtCore, QtGui
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQt4
To my opinion the issues is in PATH variable. I am not root in Linux, so installed python only for my user.
I assume I need to setup some environment variables, but don’t know which ones.
Can you please help?
P.S. My linux is not conntected to Web, so need to download all packages seperatly.
I am newbie to Python GUI using Qt libraries, I started learning PyQt development in Pycharm IDE I tried to run code-- started showing
C:\Python27\python.exe C:/Users/xxxx/PycharmProjects/initproject/helloworld 12:58, hello world
Traceback (most recent call last):
File "C:/Users/xxxx/PycharmProjects/initproject/helloworld", line 4, in <module>
from Pyside.QtCore import *
ImportError: No module named Pyside.QtCore
Process finished with exit code 1
I checked project Interpreter(using python 2.7) and also checked for installed packages(pip, setuptools- i found Pyside) but still its showing Error. Please help and thanks in advance.
I believe your mistake is simple: It is PySide and not Pyside. Try:
from PySide.QtCore import *
All package names and objects are case-sensitive.