I'm new to python,
in a tutorial video they have the line import postprocessing as pr,
however I receive error Error: No module named 'postprocessing'
But pip install postprocessing doesn't work, I get error No matching distrubution found for postprocessing
Edit: apparently this may be a postprocessing.py file somewhere that wasn't released.
How do I use / install postprocessing in python?
To see if it is installable with pip u can search pypi library to find out.
You've mentioned it's a video tutorial, are you sure you didn't miss out on a step you need? probably to create the postprocessing.py file so that you can import from there?
I reckon the best way to know should be to ask in the comment section of the tutorial site.
Related
I have a question regarding h5pyViewer to view h5 files. I tried pip install h5pyViewer but that didn't work. I checked on Google and it states that h5pyViewer does not work for older versions of Python, but that there are a few solutions on GitHub. I downloaded this with pip install git+https://github.com/Eothred/h5pyViewer.git which finally gave me a successful installation.
Yet, when I want to import the package with import h5pyViewer it gave me the following error: ModuleNotFoundError: No module named 'h5pyViewer'. However when I tried to install it again it says:
Requirement already satisfied: h5pyviewer in c:\users\celin\anaconda3\lib\site-packages (-v0.0.1.15)Note: you may need to restart the kernel to use updated packages.
Any ideas how to get out of this loop or in what other way I could access an .h5 file?
There could be so many things wrong so it's hard to say what the problem is.
The actual package import has a lowercase "v": h5pyviewer (as seen in your error message).
Your IDE/python runner may not be using your Conda environment (you can select the environment in VSCode, and if you are running a script in the terminal make sure your Conda env is enabled in that terminal)
The GitHub package might be exported from somewhere else. Try something like from Eothred import h5pyviewer.
Maybe h5pyviewer is not even supposed to be imported this way!
Overall, I don't suggest using this package, it seems like it's broken on Python 3 and not well maintained. The code in GitHub looks sketchy, and very few people use it. A good indicator is usually the number of people that star or use the package, which seems extremely low. Additionally, it doesn't even have a real readme file! It doesn't say how to use it at all. Suggest you try something else like pandas. But if you really want to go with this, you can try the above debugging steps.
I want to import module from github repo in my pyscript.
From this command link -
pip install --upgrade --no-cache-dir git+https://github.com/StreamAlpha/tvdatafeed.git
So that I can use this code in my pyscript code-
from tvDatafeed import TvDatafeed, Interval
username = 'YourTradingViewUsername'
password = 'YourTradingViewPassword'
tv = TvDatafeed(username, password)
Check first if this is an import case issue, as reported i StreamAlpha/tvdatafeed issue 94:
You can bypass pip by installing via Git using the second command under the installation section.
If you go this route, you’ll need to change your import statement from using tvdatafeed to tvDatafeed
edit:
pip install --upgrade --no-cache-dir git+https://github.com/StreamAlpha/tvdatafeed.git
So in your case:
from tvDatafeed import tvDatafeed, Interval
^^^^^^^^^^
That's a good question. Feel free to track it under pyscript's github.
I don't think that's possible because we're currently relying on Pyodide's packaging system and I don't know deep implementation details, but as far as I understand only pure python packages + whatever they ported manually currently works...
I guess one thing you could do is manually create a package yourself.
Can I "fake" a package (or at least a module) in python for testing purposes?
But! It's a lot of work unfortunately.
You can also reach out to the author and let them know it's not working on pypi and/or offer to maintain the package yourself!
Cheers and if still in doubt feel free to join pyscript channels: https://github.com/pyscript/pyscript-collective#resources
So I've cloned this
https://bitbucket.org/romildo/django-jqgrid-demo.git
as I am looking for a working example of jqgrid with django.
I've been updating the code (as this seems like it was written for a version 2 of django and I'm workng on 4.1)
I'm completely stumped by the lines
from jqgrid import JqGrid
giving me this error
ModuleNotFoundError: No module named 'jqgrid'
I cannot find a reference to jqgrid within pip and I cannot install one (jqgrid is not a python package)
I understand that jqgrid is a javascript component around jquery but how do I get that to work in Python
I have google for django-jqgrid and on youtube. None of the answers provide enough information to get a simple working example up. There seems to be an assumption that everything is installed and I'd like to understand what is required where and how to reference
What am I missing?
Simply you can install this library:
pip install js.jqgrid
And now your above error will solve
Trying to access the todoist api, and I copied some code from the api documentation. However, on my system I get an error stating:
Unable to import 'todoist.api'pylint(import-error).
I installed it with:
pip install todoist-python
as mentioned in the documentation
from todoist.api import TodoistAPI
I get my error on the very first line. How do I not get this?
You did everything right, so it's probably related to the way your installation is set.
Be sure you are using the same python you used to install the library. Check if the library is installed (pip list) and check if you're using the right Python when running the code. It's possible that the library was installed in one version and you're using the other.
I had the same problem, I solved it by following the GitHub instructions, but the name of the module to install using pip is todoist.
I am trying to load/read a ply file using PyMesh and this line command:
mesh = pymesh.load_mesh("model.obj")
as it is in http://pymesh.readthedocs.io/en/latest/basic.html.
But this gives me an error "AttributeError: 'module' object has no attribute 'load_mesh'".
Am I doing anything wrong? Also I want to know if PyMesh really allows to visualize in 3d the objects.
Thank you.
If you installed with pip, you might not have gotten the pymesh module you were intending to use. Since you're looking for the load_mesh() method, you'll want to use this installation guide: http://pymesh.readthedocs.io/en/latest/installation.html.
There are actually two modules named pymesh.
Pymesh by Takuro Wada
If you install pymesh using pip you are installing this one which has the following GitHub page.
It reads: .sty and .obj
Pymesh by Qingnan Zhou
If you want to install http://pymesh.readthedocs.io/en/latest/ you have to follow the installation guidelines here.
It is more complex, I never manage to get it working, but it should read also .ply.
On a side note, meshio (one of my projects) now supports PLY as well. Install with
pip3 install meshio
and use on the command line like
meshio-convert in.ply out.vtk
or from within Python like
import meshio
mesh = meshio.read("in.ply")
# mesh.points, mesh.cells, ...
Since you are look for load_mesh() method, i think that you are looking for this library.
This is the related doc.
If true, you have to install pymesh2
pip install pymesh2
Otherwise you have to follow the instructions contained in that page as already suggested, but they are more complex.
Either you have not imported the pymesh library
import pymesh
OR
You have a file named pymesh.py in your directory where you are executing this file.
If this is the case, then rename the file to some other name.