I'm trying to create a module that uploads multiple files to an email using python. The method I've elected to use is found here (https://www.codeforests.com/2020/06/05/how-to-send-email-from-outlook/) which requires that you install pywin32. I tried to do the pip install, which didn't work as it was already downloaded, but I'm still having trouble getting the module to run properly. I've tried uninstalling and reinstalling, and I have it in Anaconda on both my base & spyder environments, but every time I run it (either JNB or Spdr) I get the same ModuleNotFoundError.
Thanks in advance.
So it turns out everything worked out whenever I downgraded the version of python I was using...
pip install pywin32==225
Thanks for your help, everyone!
Related
I am new to Python.
I am trying to use the Sympy package.
I am running Python 3.11 in Pycharm
I am using Windows 10.
It displays:
ModuleNotFoundError: No module named 'sympy'
I ran pip install sympy, it installed it. And when I try reinstalling it, it displays:
Requirement already satisfied: sympy in c:\users\jrk\appdata\local\programs\python\python311\lib\site-packages (1.11.1)
Requirement already satisfied: mpmath>=0.19 in c:\users\jrk\appdata\local\programs\python\python311\lib\site-packages (from sympy) (1.2.1)
I tried going through this guide
https://bobbyhadz.com/blog/python-no-module-named-sympy
but it did not work.
I tried uninstalling it and reinstalling it
both with pip and mpip
it unfortunately didnt work
at the top you can see which interpreter i am using
I can see that there is a file called sympy in my downloads folder, maybe that has to be relocated, but where to?
My instructions might be a bit rusty as I don't regularly use Windows for Python but here goes:
You'll notice that the path to your Pycharm Python interpreter (c:\Users\jrk\PycharmProjects..) is different than the path reported by pip in your error messages (c:\Users\jrk\appdata..).
It's perfectly normal to have multiple versions of Python around, but you'll need to be a bit careful about which one you're invoking.
It's unclear from your description where exactly you are running the pip commands, but usually if you open built-in terminal in Pycharm, it most likely has the right virtual environment activated automatically. The command line prompt should begin with (venv) if that is the case. If you then run pip install sympy you ought to have it installed in the correct place.
If you're using a regular command prompt, you can also manually activate the virtual environment by running the activate or activate.bat file that you'll find in c:\Users\jrk\PycharmProjects\pythonProject\venv\Scripts\ folder.
Might want to also read a bit about virtual envs # https://docs.python.org/3/library/venv.html
I found the solution. I do not know why it worked. But i moved the project from the local file on my computer to the server we use in our company, and then it worked
Try Uninstalling it and reinstalling
pip uninstall sympy
pip install sympy
I seem to be facing this error continuously despite:
Installing the mysql-connector via "python -m pip install mysql-connector-python"
Installing the MySQL package via "pip install MySQL"
I have confirmed that I have installed the package as it says "Requirement already satisfied everytime I run it again in the terminal". Additionally, I have tried installing and reinstalling the package as well.
But all the results are the same. Each time I run my script and try to "import mysql.connector", I always get the ModuleNotFoundError: No module named 'mysql' error
Would greatly appreciate some help. Thank you very much
Do you use virtual environments? If it is a virtual environment, please copy the contents in the expansion package folder of the virtual environment to the package folder under python.
If you have two versions of Python in your system, you may also encounter this problem. "CTRL+SHIFT+P" and choose the correct interpreter.
You can use the following method to check and see where pip installed the package:
pip show MySQL
Every guide I've found on the web says that all I have to do to install PRAW is type in:
>> pip install praw
However, I've been trying to do that for an hour and it just keeps saying 'invalid syntax'. I tried on windows command prompt, and that doesn't work. I installed PIP when I installed python, but I'm not seeing a python install on my C:\ drive and no matter how many times I reinstall I can't make this work. It's driving me nuts. Does anyone know what I'm doing wrong?
I'm on Windows 10 with the latest version of Python
It turns out I didn't install for PATH. This was easy to miss as it's tiny and on the first installer page. It also didn't totally solve the problem, but did allow me to install PRAW.
I have recently uninstalled python 3.7 and installed python 3.9. After that, when I try to use pip to install any package, it keeps trying to use python37.exe, which is not installed anymore. I was able to solve that by using python -m pip install, but the same does not work when I try to launch jupyter notebook, which still tries to use python37. I cannot launch it using a similar command python -m jupyter notebook.
I was wondering if there is any solution to this, since I could not find anything related to that.
Thanks in advance.
Maybe try to install it again using your new pip like
pip install notebook
(Sorry not enough reputation for a comment)
This usually occurs when jupyter is installed with a specific version of python. The easiest / best solution is to uninstall jupyter, then reinstall it with the correct version of python.
In your case, you should consider using python3.9 -m pip install jupyter (after first uninstalling jupyter).
Just to give you all an update in case anyone is facing the same problem.
I was able to find some remaining files and files of the previous installation of Python 3.7 in my system that were not deleted for some reason during the uninstall process. I deleted them manually and my system started to recognize Python 3.9 to call pip and jupyter after that.
Even after downloading the library pyttsx3 it cannot import. It says: lmodule not found error.
I tried all the methods available as:
using pipenv
upgrading pip
But I am still dealing with same problem:
This happened to me as well, what I did is reinstall python to the newest version, once I had it I installed it using pip3 install pyttsx3, and it solved the problem for me.
(note that I'm using pip3 because I' using python3 for my project, it shouldn't cause problem to use pip but just to make sure)
Try download whl file of pyttsx3 from here.
For example download it to F:/file.
Then use pip install F:/file/pyttsx3-2.90-py3-none-any.whl to install.
The problem with pyttsx3 is that it does not work for python version 3.4,3.5,3.6
But it works for python 3.8 and above but in the documentation, it is mentioned it works woth any python above version 3+