I'm running into a few weird errors using my python environment. It appears I was able to set up pip and python correctly in python 3.4.
I tried to follow a tutorial for hotkeys. I installed pynput in C:\Python34\Scripts using pip install.
Tried 'import pynput' in Idle, worked fine without errors.
I then tried to install keyboard.
This time I got an error in Idle. Is there a strange reason why this module wouldn't go through without errors in Idle? Another weird error I'm getting is:
'pip not recognized as internal or external command' in C:\Python34
Any idea why this is happening? If I installed it in a higher directory like C:\, would this fix the issue?
Thanks for your help.
Related
Reference: https://github.com/ImSoErgodic/py-upset
Hello! I have installed pyupset via both pip, pip3, and the source directly, as described in the link above. The terminal is saying that I have it completely downloaded. However, when I go to spyder and type "Import pyupset", I get the ModuleNotFoundError. After some research, it seems as though there's a discrepancy between the Python 3.8 library it is downloading to and the Python 3.9.5 I am using in Spyder, and that is the reason it doesn't show up. Does anyone know how to access the Python 3.8 downloads or generally have a way to access the script? I've also tried with a script updated for the recent Python iterations (https://github.com/jnothman/UpSetPlot) that does a similar function, but I'm getting the same error. Thank you!
Inside spyder try using import pip then run !pip install py-upset which should add it to your 3.9.5 environment.
When I launch the Jupyter notebook from anaconda navigator, there will be some errors. I am using Mac.
I tried to search it up on Google and StackOverflow, but I still can not figure a way to fix this issue.
Based on my searches, I assumed the issue is showing up because I have multiple python versions, and there might be some issues with my directory? ( Maybe in Anaconda, it is pointing to a wrong python directory? )
and these are the screenshots of the error.
Can someone see what is the issue here?
Screenshots of the errors :
Use :
pip install torch-encoding
if it throw any error try to clone it from
https://github.com/zhanghang1989/PyTorch-Encoding
after that, run the setup
python setup.py install
I am encountering issues with installing certain Python modules on Windows, using pip. In particular, I am using Flask, but I am encountering the error 'flask' is not recognized as an internal or external command,
operable program or batch file. in command line.
However, I am able to run my code properly with python -m flask run for some reason. After investigating, I figured there was a problem with my installation of Flask, so I did pip install --upgrade --force-reinstall flask to hopefully fix the issue. I then encounter the warning message: the script flask.exe is installed in 'C:\Users\Name\Appdata\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts' which is not on PATH.
Why would my package be installed to this location? My understanding is the default location for a package installation should be C:\Users\Name\AppData\Local\Programs\Python\Python38\Lib instead. How can I fix this. It seems all my packages are being installed to this strange folder, which is giving me countless issues. I have tried force upgrading pip, and reinstalling python to no avail.
I installed pygame with pip and it successfully installed.I even add it to the path.when I check it in cmd with py -m pip install -U pygame--user it works fine and shows that pygame is installed but when I want to run the code import python in idle it sends back an error that no module named pygame.I tried and figured out that if I write the code import pygame in the shell it works but if I want to try it in idle(or the shell that opens with running ths idle)it doesn't work. Can any one please tell me whats going on here and how can I make it work??
Btw both my python and pygame are for win64 and I'm using windows10
The same things happened to me a few days ago. I fixed it by deleting Homebrew and then reinstalling it. I would go here for context:
https://brew.sh/
I am following this guide to be able to use OpenCv.
On the step where it says to source the script (source /usr/local/bin/virtualenvwrapper.sh), I get the following error message:
/home/user/anaconda3/bin/python: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/home/user/anaconda3/bin/python and that PATH is
set properly.
If I run whereis python I get /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python3.6 /usr/bin/python3.5-config [...]
Which I feel is the source of the problem because doing python -V
gives me Python 3.6.1 :: Anaconda 4.4.0 (64-bit)
instead of Python 2.7.12, which I've been told should be the Ubuntu default installation, and which is what I get if I remove anaconda from PATH.
So what I feel is happening is that anaconda is forcing (maybe it all is my fault and I configured it this way and do not remember) to be the default python execution, and to be 3.6, and when I try to install this package it can not run since it expects something else.
Is there any way to clean this mess up? Because the problem is that I do not know HOW it is supposed to be to work so I can not fix it, at the moment.
Change your path variable -Point To python 2.7
Not sure if this solution will help anyone else in the future, but since it is my own question, here is what is apparentely working for me. And I say that because all this problem comes from installing openCV and I am not done nor I have any more experience than when I started.
In bashrc: export VIRTUALENVWRAPPER_PYTHON=/home/youruser/anaconda3/bin/python3.6
to export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
Once that is done, I am able to do source /usr/local/bin/virtualenvwrapper.sh
even though any new terminal opened keeps showing the error message