Cannot import torch module despite installing Pytorch - import

For some reason, I cannot import torch with my Python scripts despite already downloading the necessary software (my version of Python is 3.8).
I have researched this problem online, including similar questions on this forum, and have followed the suggestions delineated in this guide: https://blog.finxter.com/python-modulenotfounderror-no-module-named-torch/
However, none of them work, and thus I'm completely stumped. Could anyone be kind enough to advise on what's causing this error?

Related

sktime is installed but cannot import or use it

I am a data science student and need to use sktime in a Jupyter notebook time series project. I have successfully installed sktime via the terminal on my M1 Macbook Pro, but I can't figure out how to make sktime work. Please help!
I have done many searches and tried many solutions on the github repository but none of them seem to have worked for me. I'm also a bit of a beginner with handling fixes like this so I have limits to how much I can help myself.

What causes Python Pytube to send me a HTTP ERROR 410 each time

I want to make a small python project and I am quite new with it. So I thought a youtube-downloader is a funny project to go by. So I looked at the documents about how to and installed everything accordingly. Now I am facing a strange 410 error. I searched on this platform the issue and some were resolved due an answer and some stayed open without closure.
The answers I found is if I(You) have the right pytube version installed. Besides that answer there was also a git repository available which I tried and it didn't work. That one is
pip install git+https://github.com/Zeecka/pytube#fix_1060
With this I still get the same error.
Anybody any clue what I do wrong? Every other example I see and want to recreate to make sure it works just doesn't for me. I feel like I misplaced a package somewhere and that's how it's poorly/unreadable.
Python version: Python 3.10.2,
pip 21.2.4 from C:\Python\Python310\lib\site-packages\pip (python 3.10)

Python in EV3 - What modules are installed?

I have specific question. I have lego EV3 and i installed Micropython. But i want import turtle, tkinter and other modules and they aren't in micropython. But time module working.Do someone know what modules are in ev3 micropython? Thanks for answer.
welcome to Stackoverflow. MicroPython is very specific to the board it has been ported to run on. There are both standard libraries and hardware specific libraries in your MicroPython port and then open-source libraries you can install. I bet MOST of the Python and MicroPython specific libraries will be in your image. More on Libraries here: http://docs.micropython.org/en/latest/library/index.html
I did not see any online documentation for Lego's MicroPython version online. If you can find it, it may have this information. If so, please post back the link in the comments.
In the absence of good documentation you can discover what is available using help().
From the link above...
On some ports you are able to discover the available, built-in libraries that can be imported by entering the following at the REPL:
help('modules')
Your other question is will every Python library work on MicroPython? No. Most will not. You can search for libraries which will work on https://libraries.io. Just be sure to use the filters to narrow the results to MicroPython libraries.
If you are in fact running micropython, you're probably not going to find any of those modules. It has "micro" in the name of a reason; while it supports a great deal of Python 3 syntax, it is not fully compatible with C python and most modules not written explicitly for micropython won't work.
You can get a list of built-in modules by running help("modules"), and you can see any modules installed on the filesystem using os.listdir().

Enthought Canopy Tcl/Tkinter error

I am working with a group of teachers using Canopy and we are trying to use Tkinter. About half the class is getting an error message when we run code that imports Tkinter. The error message we get is:
TclError: Can't find a usable init.tcl in the following directories:
C:/Users/tg9154/AppData/Local/Enthought/Canopy/App/appdata/canopy-1.5.4.3105.win-x86_64/lib/tcl8.5 C:/Users/tg9154/AppData/Local/Enthought/Canopy/User/lib/tcl8.5 C:/Users/tg9154/AppData/Local/Enthought/Canopy/lib/tcl8.5 C:/Users/tg9154/AppData/Local/Enthought/Canopy/User/library C:/Users/tg9154/AppData/Local/Enthought/Canopy/library C:/Users/tg9154/AppData/Local/Enthought/Canopy/tcl8.5.2/library C:/Users/tg9154/AppData/Local/Enthought/tcl8.5.2/library
This probably means that Tcl wasn't installed properly.
I have tried all of the fixes I have found online and none of them are working. I am wondering if a complete uninstall/install would work but I am hoping that there is a easier fix since I have so many teachers who would have to do the same thing.
This bug on Windows in Canopy 1.5.3/1.5.4) was fixed in Canopy 1.5.5, released July 3.
To update to the current version of Canopy, see this article.

How to get Net-SMTP-SSL work with Bugzilla in Ubuntu 12.04?

I have installed Net-SMTP-SSL (/usr/bin/perl install-module.pl Net::SMTP::SSL) since I'd like to configure Bugzilla email with Gmail. I did't got any error. However, when I run './checksetup.pl --check-modules', I still get the result:
Checking for Net-SMTP-SSL (v1.01) not found
I also try to re-install it and I still get the same output. Here is my system information:
Ubuntu 12.04
Bugzilla 4.4.6
After having the same problem with Bugzilla recently, I ran across this rejected bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=897355
It mentions that there are some dependencies that Bugzilla isn't installing, but doesn't say which ones. So I just ran cpan and issued the upgrade command from the cpan console to upgrade all packages. This went though and installed a few dependencies from various packages that it said were missing. I didn't see which ones were related to the SMTP SSL package since it was installing stuff several levels deep in dependencies, but after running that and then running checksetup.pl in Bugzilla, the problem seemed to be fixed. Warning: It did take quite a while to upgrade all packages, though.
That fixes the issue with Bugzilla not detecting properly, but unfortunately it seems there's a bug in Net::SMTP::SSL conflicting with one of it's own dependencies. You'll get an error something like "Not a GLOB reference" if you try to run the package directly. You can see it by running this after updating all of the packages:
perl -MNet::SMTP::SSL -wE 'say $Net::SMTP::SSL::VERSION'
If you get a version number returned then it's working, but I get an error and have seen other posts about it, too. I haven't been able to fix this problem yet, but there's probably some combination of the SSL package and various versions of it's dependencies that actually works, just not the latest of each. Otherwise, I would think there would be a known issue in Bugzilla release notes as they would have run across it during testing.
I haven't had time to do it and haven't seen that anyone else has either including the package maintainer, but I suppose you could find all of the dependencies for Net::SMTP:SSL and then one by one update the packages using something like:
cpan upgrade Net::SMTP::SSL
Then replace Net::SMTP::SSL with each of it's dependencies one at a time and test using the perl command above. When it breaks, you'll know which package is conflicting. You can then roll that package back to an earlier version and update all other dependencies and hopefully it will fix the issue. It's definitely possible that no combination will work, though, and if that's the case, I'll be a little disappointed in Bugzilla's testing process.
You can find dependencies using various methods, but CPAN has one. Here's a link to an article about how to create a perl script to use it: https://metacpan.org/pod/CPAN::FindDependencies
Anyway, this may not solve your problem, but I hope it helps in tracking down the issue, and know that you are not alone. If you do find out anything, please post it here. I will do the same if I have more time to work on it later.