ive got a really annoying error , when i import a module in Eclipse
i get always that error:
Traceback (most recent call last):
File "C:\Users\b_origin\workspace\test\test.py", line 1, in <module>
import win32api
ImportError: DLL load failed: The specified module could not be found.
I've installed pywin32 , their folders are in C:\Users\b_origin\AppData\Local\Programs\Python\Python35\Lib\site-packages\ but always i get that error.
When i run python from CMD , they are being imported correctly with no errors.
Check the picture belove to see my preferences/interpreter in Eclipse
my preferences
Related
After installing the pyautogui package with pip, I tried using it in the IDLE shell by typing pyautogui.
However I get the following error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
pyautogui
NameError: name 'pyautogui' is not defined
I have scoured the web but have not been able to identify why IDLE will not recognise that pyautogui is installed.
Please let me know if you need more information to answer.
Have you tried importing the package first?
Try:
import pyautogui
I'm having issues running ortools on Linux. I downloaded it from google's site (https://developers.google.com/optimization/) and installed it using "make install," but when I go to use it in python I get the following:
Traceback (most recent call last):
File "regular.py", line 42, in <module>
from ortools.constraint_solver import pywrapcp
File "/home/m3/summer/ortools_examples/examples/python/ortools.py", line 2, in <module>
ImportError: No module named linear_solver
It looks like despite installing ortools, its still not in my python path correctly, so when I call it in the file, it doesn't find anything and returns an error, right? Any advice on how to solve this?
I can't import the sompy module even though I installed it successfully, and it appears in the modules list of my python environment:
When I try to import the sompy module using the following statement:
import sompy
I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sompy'
What's wrong?
Which interpreter/IDE are you using? If using PyCharm, the problem could be that PyCharm hasn't identified a root folder for your .py project.
I would try and recreate the root folder as a subfolder and right click > Make source directory.
I recently downloaded and installed pygame. I tested it with the following code.
import pygame
I received the following error:
C:\Python34>python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
import pygame
File "C:\Python34\lib\site-packages\pygame\__init__.py", line 95, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.
I currently have Python 3.4 32 bit and have downloaded pygame-1.9.2a0.win32-py3.2 and installed it. I tried uninstalling and reinstalling multiple times. What am I doing wrong?
Pygame doesn't work for Python 3.4. The pygame that you downloaded is for Python 3.2. If you download Python 3.2, you should be able to use pygame.
I read the py2exe tutorial and successfully convert my python code to a running exectuable.
But when i tried to run it on another computer that dont have python installed , i get the following error:
Traceback (most recent call last):
File "C:\Program_Files\Pyton2_7_2\lib\site-packages\py2exe\boot_common.py", line 92, in
ImportError: No module named linecache
Traceback (most recent call last):
File "auto_create_workspace.py", line 1, in
ImportError: No module named subprocess
On my computer , even if I uninstalled python , it still works.
UPDATE
I tried to copy the dist folder to another drive on my computer and it still working.
When I copy it to network drive and run from there , I get the same error as above.
What can be the problem?
I still dont know what is the problem in py2exe, so I tried pyinstaller instead and its works