xlsxwriter installed but "No module named xlsxwriter" in psychopy error - python

I've tried installing xlsxwriter on MacOS
I tried:
pip install xlsxwriter
easy_install xlsxwriter
python -m easy_install xlsxwriter
python -m pip install xlsxwriter
with
pip uninstall xlsxwriter
in between each attempt.
I've tried all different versions of Python and Psychopy, and for the life of me, I can't get rid of this error when I try to run Psychopy:
"No module named xlsxwriter"
I know it's installed because I can search for it (it says it's located in
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/XlsxWriter-1.0.0-py2.7.egg)
I've tried moving it and copying it to all different levels of my Python folder in "Applications" as well as putting it in the same folder as my .py file I'm trying to run in Psychopy, and I just can't get it to work.
I've tried updating xlsxwriter (it's currently 1.0).
I've tried case-sensitive (XlsxWriter vs. xlswriter).
I've read the forums on this but none of the suggestions have helped so far. I don't know what else to do.

This actually worked great for me:
Make sure/or change directory of your windows python 27 or python 33 is C:\Python27
Download XlsxWriter package ( https://pypi.python.org/pypi/XlsxWriter )
Extrat tar file (lookup for tar extractor tool for windows)
Open cmd
Go to your downlaoded and extracted package directory
Type in command prompt: python setup.py install
You can now check module intalled in C:\Python27\Lib\site-packages

did you tried pip3 install xlsxwriter. worked for me.

Related

Module pyaxidraw not found even though it's in site-packages

I tried to connect to my pen plotter using package pyaxidraw. I did install it successfully, upgraded as it says on their site by using commands:
python -m pip install https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip
python -m pip install https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip --upgrade --upgrade-strategy eager
It is visible in site-packages folder, the files are there. However, I cannot import it in my scripts - I get ModuleNotFoundError: No module named 'pyaxidraw'.
Path to site-packages is added to Path variable, as are many other paths to python. Tried installing it through python setup.py install and pip install . and nothing changed.
I also tried running the code below and it does work fine through terminal:
python -c "from pyaxidraw import axidraw; ad = axidraw.AxiDraw(); print(type(ad)); ad.interactive(); ad.connect(); ad.moveto(3, 5); ad.lineto(0, 0); ad.disconnect();"
this makes my plotter move and plot just fine while in code it's still underlined in red because I can't import it.
But running the same code with "python3" instead of "python" in terminal gives me ModuleNotFoundError: No module named 'axidrawinternal'. It is said to work with Python 3.6 so I don't get what is happening.
How do I make python/Pycharm see this module so I can write scripts with it?

Why am I getting "ModuleNotFoundError: No module name "pyperclip"?

I'm receiving this error although it works fine in the idle shell?
I am currently working through the Automate The Boring Stuff book.
I tried to search for which directory it was saved to but when I reach c:\users\Jibby\appdata\local\programs\python the only thing in the python folder is a folder named mu.
Edit: Apologies for not going into more detail, I already have it installed > I get this message when I try to pip install it again "Requirement already satisfied: pyperclip in c:\users\jibby\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (1.8.2)"
It's just that when I try to run a batch file using an import pyperclip statement, it refuses to acknowledge that I have it installed. That's what I was trying to show in the Error Code photo by showing it imports fine in the IDLE shell but doesn't work when trying to run said batch file.
My error:
You have to install pyperclip from cmd with
pip install pyperclip
Be sure to read Appendix A for how to install third party modules (including pip)
try to type into the command promt:
"pip install pyperclip"
https://pypi.org/project/pyperclip/
Got it to work by typing in "py -m pip install pyperclip" into the command line.

ModuleNotFoundException youtube-dl module is not recognized

i have installed the youtube-dl module via pip with pip install youtube-dl and it worked. I can use it in CMD but for some weird Reason Python says that the Module doesnt exist:
Extension 'cogs.music' raised an error: ModuleNotFoundError: No module named 'youtube_dl'
this problem usually happens when there is more than one python version on the computer, download the modules according to the version you want to use
if this is didn't work for us do like bottom steps
go your python libs path and look up you must got this ........\lib\site-packages\youtube-dl
if you havn't got, go pypi site and download packets
after that, take out this file to ......\lib\site-packages
you should see like this :
or you can do like this:go your python path and open cmd and start writing:
......\python.exe -m pip install youtube_dl
Try the following command.
pip3 install --upgrade youtube-dl

Can't import ijson module on python 3.7.0

I have installed python 3.7.0 and my installation directory is AppData\Local\Programs\Python\Python37-32
Now I have tried to upgrade pip with:
python -m pip install –upgrade pip'
and I got:
Successfully installed pip-19.0.3
I did pip install ijson(while I was in folder AppData\Local\Programs\Python\Python37-32\Scripts) and double checked with the result being:
Requirement already satisfied: ijson in c:\users\myusername\appdata\local\programs\python\python37-32\lib\site-packages (2.3)
But when I go to my PyCharm project and I import ijson it can't find the module.Just to be clear if I import json or any other module I can work with it.
I know this has some duplicates and I have seen some of them. I have tried everything for example on these and others. Just for reference (possible duplicate)(possible dublicate 2)
but I haven't been able to solve my issue. Please tell me if I am missing something, maybe it is connected to the interpreter I am using or a wrong installion of python.
Thank you in advance
Make sure the python interpreter you are using in Pycharm is the one where you install ijson via pip.
You can do this by looking at the interpreter path in PyCharm, then opening that path in your terminal and trying import ijson
Also make sure the pip you are using is connected to the python interpreter you are using in PyCharm

PyHook on python 3.5

I am trying to write a basic keylogging program on python. I need to install the pywin32 and pyhook modules. I have managed to get pywin32 installed, but cannot seem to pyhook to work. I have read its possible to get it to work on later versions of python, but cannot seem to figure it out. I have tried both .exe and .whl installs. Using whl in cmd gives error that the wheel is not supported. Does anyone have a solution to install pyhook on python 3.5. Thanks
This is how I did it...
Download the py hook module that matches your version of python from here. Make sure that if you have python 32 bit you download the 32 bit module (even if you have windows 64x) and vice versa.
Open your command prompt and navigate to the folder where you downloaded the module
Type "pip install " and then the name of the file.
Ex: "pip install pyHook-1.5.1-cp27-none-win32.whl"
Note : you need pip
If your pip install have not success.
Try -> when you download a pyHook-1.5.1-cp27-none-win32.whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook
After that move file to Programs\Python\Python35-32\Scripts path
and then pip install pyHook-1.5.1-cp27-none-win32.whl
I hope my answer is useful for you.

Categories