I'm trying to run the python script which has Xlwings for preparing excel in Windows 10 but I get the following error when I tried to run the script. I have already installed the Xlwings libraries.
Traceback (most recent call last):
File "C:\Users\xxxxx\Desktop\Python automation\PT.py", line 17, in <module>
import xlwings as xw
ModuleNotFoundError: No module named 'xlwings'
Can anyone please advise what's wrong with the xlwings. Please help
On your project folder, from your terminal, try doing this:
python -m venv venv
Windows - venv/Scripts/activate
Unix - source venv/Scripts/activate
You'll create a virtual environment. Then just pip install xlwings + other dependencies & re-run your project. Hope this helps
Related
Python noob here. I've been trying to install pygame and pandas for a few hours now. Even with Conda I did not succeed. I have Python 3.8.5 installed.
I eventually tried through the terminal with these commands:
python -m pip install pygame==2.0.0.dev6
and
python -m pip install pandas
(this was a total guess by the way, but apparently it did something)
Results were succesfull:
Requirement already satisfied: pygame==2.0.0.dev6 in /opt/miniconda3/lib/python3.8/site-packages (2.0.0.dev6)
and
Successfully installed numpy-1.19.2 pandas-1.1.2 python-dateutil-2.8.1 pytz-2020.1
But, when I try to import either modules, I still get errors. Any ideas?
import pygame
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import pygame
ModuleNotFoundError: No module named 'pygame'
import pandas
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import pandas
ModuleNotFoundError: No module named 'pandas'
Do I need to move the modules to the script folder or something? Or what do I even move? Thanks!
Ok.. Got it thanks to #matt.. after succesfully installing pygame, find the environment in which pygame is installed by entering 'which python'.
In my case it returned:
/opt/miniconda3/bin/python
Now I needed to make sure the VS console was pointing at the same environment, by checking which python interpreter it was using and selecting the correct one. More info:
how to check and change environment in VS Code
I have used matlab, but I am only 2 weeks into Python. I downloaded anaconda 3.7 and am using spyder 4.1.3. I was following a youtube tutorial on python. I was doing well until the guy access the cmd prompt (I use Windows 10) from within his IDE.
I didn't know how to so I googled it and to do so I found on pypi.org that all I had to do was run pip install spyder-terminal in the cmd prompt. I tried this but at the end it said that I had a permissions error and to try the --user option. I copied and pasted the exact error and saw on git hub, to create an environment or run python -m pip install --user [INSERT PACKAGE NAME].
I don't really understand hat an environment is so I did the second --user way. I ran python -m pip install --user spyder terminal I got an error about a location not being in the path variable, so i just copied the file location that it referenced and copied it the the path. I then went to open up spyder 4.1.3 and i got the error
Traceback (most recent call last):
File "C:\Users\Aaron\anaconda3\lib\site-packages\qtpy\__init__.py", line 204, in
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Aaron\anaconda3\Scripts\spyder-script.py", line 10, in
sys.exit(main())
File "C:\Users\Aaron\anaconda3\lib\site-packages\spyder\app\start.py", line 201, in main
from spyder.app import mainwindow
File "C:\Users\Aaron\anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 53, in
requirements.check_qt()
File "C:\Users\Aaron\anaconda3\lib\site-packages\spyder\requirements.py", line 41, in check_qt
import qtpy
File "C:\Users\Aaron\anaconda3\lib\site-packages\qtpy\__init__.py", line 210, in
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found"
I tried opening it again and got the same error. I then tried uninstalling an dre-installing spyder in the anaconda navigator and got the same error. I tried removing the location I added to path and running "pip uninstall spyder-terminal", it said it was removed and I go the same error.
If possible, I am seeking specific steps in layman's terms, because all my knowledge thus far has come from the first 2 hours of a "cool things in python" type video.
Firstly, I just want to mention that this is my first post and I'm a python noob. Also, I realize my post title is very much like many others already on stackoverflow, but alas, have been unable to find anything that is of help to me.
Problem:
I'm unable to import the pygn module, despite having installed it in my virtual environment.
Error:
ModuleNotFoundError: No module named 'pygn'
Repro Steps:
1. conda create --name gn
2. activate gn
3. conda install pip
4. pip install pygn
5. conda list to verify package was successfully installed in gn env (it was)
6. python gracenote.py
7. Traceback (most recent call last):
File "gracenote.py", line 1, in <module>
import pygn, json
ModuleNotFoundError: No module named 'pygn'
Any help in resolving this error would be greatly appreciated.
Pypi has this entry for pygn, which actually refers to a project named pyg. It looks like you'll need to manually include this repo as a part of what you want to do.
This question has been asked a few times, but the remedy appears to complicated enough that I'm still searching for a user specific solution.
I recently installed Quandl module using pip command. Even after successful installation my python idle is still showing
Traceback (most recent call last):
File "F:\Python36\Machine Learning\01.py", line 3, in <module>
import Quandl
ModuleNotFoundError: No module named 'Quandl'
I have used import command in my code.
I am using python 3.6.1 version.
I am working on a windows 10 Desktop.
I have also tried re-installation of module.
You can better navigate to your python scripts folder and open a command window there and try pip3 install quandl .Hope this helps.
I have Python 3.5.2 (Anaconda 4.2.0 (x86_64)) on my Mac laptop and I am facing this problem:
import spm1d
Traceback (most recent call last):
ImportError: No module named 'spm1d'
I searched about the problem and I did not find any solution.
Thank you in advance
It means that the module (spm1d) is not installed, you have to install the module before import, open terminal bash run the command:
easy_install spm1d
or you can refer to the official document below for more detail:
http://www.spm1d.org/install/InstallationPython.html
Hope it will work for you.