I am a complete beginner to programming, python, pronterface and 3d printing so unsurprisingly I am having a few difficulties.
I have now managed to download pronterface and get it running on my computer, i think i followed the download instructions correctly and have skeinforge downloaded also in the printrun folder.
My problem is that when I try to open or load a .stl file I get the following:
Skeining C:\Users\James\Downloads\70mm_Faberdashery_Yoda-Lite_less_robe.stl
Skeinforge execution failed.
Traceback (most recent call last):
File "C:\Users\James\Desktop\3d printer software\pronterface\Printrun-d482c66\pronterface.py", line 940, in skein_func
from skeinforge.skeinforge_application.skeinforge_utilities import skeinforge_craft
ImportError: No module named skeinforge_application.skeinforge_utilities
However the file is in the right place I think:
C:\Users\James\Desktop\3dp\pronterface\Printrun-d482c66\skeinforge\skeinforge application\skeinforge utilities\skeinforge_craft
Can you try to explain in plain language any ideas to fix this as I am a total beginner and don't even really know what a module import error is.
Someone on the reprap forms was having a similar issue, the recommendation there is to run skeinforge from the command line.
To solve the problem more satisfactorily, you'd need to check what path is available to python and make sure that the path to the skeinforge module is in your system path or the python path.
Related
I am using PyScripter to implement a lesson from the Python Tutorial: https://docs.python.org/3.7/tutorial/modules.html#more-on-modules
However, when I attempt to import my own module quadform.py in a separate code by calling
import quadform
quadform.quad_form(1,1,-6)
I get the error:
Traceback (most recent call last):
File "<module1>", line 1, in <module>
ModuleNotFoundError: No module named 'quadform'
Even more confusing is that when I copy + paste the exact code into a separate module saved in the same location, the import on the second module does works. Since then, I have tried various permutations of syntax, using different IDEs, calling from different modules, calling from the shell, and fiddling with the Path in Environment Variables with only a few successes and seemingly at random.
Can someone explain what might be the issue? At the moment, I cannot reliably call any of my modules without getting the same error. I am a beginner trying to pick up Python (and programming in general) on my own so any help would be greatly appreciated.
Read further down:
https://docs.python.org/3.7/tutorial/modules.html#the-module-search-path
https://docs.python.org/3.7/tutorial/modules.html#packages
https://docs.python.org/3.7/tutorial/modules.html#intra-package-references
If you structure your modules like it says, you should be able to import the right things. sys.path is a list of the folders Python looks in to find packages.
I tried installing the deuces package in python using
python -m pip install deuces
which installed perfectly. But whenever I attempt to call upon the function, I get an error message:
Traceback (most recent call last): File "", line 1, in
File
"C:\Python\Anaconda\lib\site-packages\deuces__init__.py", line 1, in
from card import Card ModuleNotFoundError: No module named 'card'
Even though I can't find anything wrong with the module calling. Would someone be able to check what's going wrong here?
PS: I did read the post Import Error Python: No module named 'card' but found no solution.
It seems the package is using python 2 only relative imports here, which was removed py PEP 404.
These should be changed to either douces.xxx or relative imports .xxx. Currently, your best hope would be to make a PR to fix this, or to fork the library and fix it yourself.
You are most likely trying to run this code in Python 3. Sadly the deuces module's page in the PyPI repository does not make it clear that the module currently only appears to support Python 2, under which the module imports perfectly.
Since it doesn't look like the module has received much attention lately, if you want to run it under Python 3 you may end up doing the port yourself. It doesn't look as though it would take too much work.
I had a simple app up and running that used the PyGui package. After I decided I had everything working I refactored my code and basically broke it up over multiple files, but I am fairly sure I did not change the location of any files. Now when I try to run my app It gives me the following error:
Traceback (most recent call last):
File "blobedit.py", line 16, in <module>
from GUI import Application, ScrollableView, Document, Window, Cursor, rgb
File "/Users/<myusername>/Desktop/BlobEdit/GUI/__init__.py", line 54, in <module>
raise ImportError("Unable to find an implementation of PyGUI for this installation")
ImportError: Unable to find an implementation of PyGUI for this installation
I have tried moving files around for weeks and can't find the problem. Any help would be much appreciated!
You have a directory GUI and inside it __init__.py, this makes the directory an importable package.
Unfortunately, PyGUI also provides a GUI package. Due to the way Python searches for packages to import, your GUI has come up first and this is what is causing problems.
The simple way to solve it is to rename your GUI directory /Users/Destkop/BlobEdit/GUI to something else.
I have been searching the web for hours now, found several instances where someone had the same problem, but I seem to be too much of a newb with linux/ubuntu to follow the instructions properly, as none of the given solutions worked.
Whenever I try to run a panda3d sample file from the python shell, I would give me an error saying:
Traceback (most recent call last):
File "/usr/share/panda3d/samples/asteroids/main.py", line 16, in
from direct.showbase.ShowBase import ShowBase
ImportError: No module named 'direct'
What really bugs me is that when I try to execute the .py file directly (without opening it in the IDLE or pycharm) it works just fine.
I know this has been asked before, but I would like to ask for a working step by step solution to be able to import panda3d from pycharm and the IDLE. I have no clue how to get it working, as none of the answers given to this question worked for me.
try to change your PYTHONPATH?
i met a problem like this, and then i modify my PYTHONPATH, and it worked.
I have a Tkinter program that i use for time management. I decided to have it scan my inbox in outlook to check emails for tags, and then based on the tag, add it to my list of tasks to do for the night.
The code i wrote works just fine, but i'm getting an error when I import win32com.client. I can import it in IDLE, but it is having problems importing when i try to run the code with a .bat file, or double clicking the .py file.
I have found several people with similar problems, but from what i can tell, it's having problems with win32api module, or pywin32
Traceback (most recent call last):
File "my_program_filename.py", line 1, in <module>
import win32com.client
File "c:/Python27/lib/site-packages/win32com/__init__.py", line 5, in <module>
import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found
I'm really confused. When i get the sys.path it's the same with IDLE as it is running from the .py file with the exception of an added "c:/users/username/desktop/timer" for my .py file.
I'm really lost and haven't had to mess with the system path, but I'm not able to figure out what i need to do to fix this.
What do I need to do to get pywin32 working so I can use win32com.client?
Any help is greatly appreciated. Thanks!
IIRC, the problem was attempting to link to the debug build. I think i had to dupe the release build and rename it to be debug or something.
try building release and see if it "just works". if so, you have a direction to explore
this is an issue of not having the correct paths in the sys.path. If you make sure that all of the pywin32 folders are in the sys.path(If you check in IDLE it can show that the folders are included even when they aren't?!?!?).
You also have to make sure you run your code from inside your Python directory or it will fail to import win32api. I also found that if you do anything in a function that uses pywin32 and you accidentally misspell the function when you call it, the whole import fails without telling you your function is misspelled. You can also navigate to the /Python27/Lib/site-packages/win32com/client folder and run makepy.py to make sure the right Object library is installed.
When you run makepy.py, you select the COM object you want to use and it creates packages specific to what you want to use. I don't fully understand why this is, but once i did this and ran my file from the Python folder it worked! There is a more in depth explanation on how to get this working right here.
I found this link to be the solution rather than the win32com/client as indicated above: win32com import error python 3.4
in my case typing in cmd:
python C:\Python27\Scripts\pywin32_postinstall.py -install
I hope this helps