Unable to download praw using pip - python

I'm currently working my way through this guide which details how to make a reddit bot. followed the first step and ran my code in Python IDLE but had an issue because I didn't have PRAW downloaded.
My question is how exactly do I download PRAW? I looked around and tried downloading it through a few methods but none of them seemed to work for me. Currently working my way through this method but I keep getting an error:
Fatal error in launcher. Unable to create process using...

Try the following
Download the zip from https://pypi.python.org/pypi/praw#downloads
Unzip.
python setup.py install

Related

How to install keyboard module without pip?

so I'm trying to install the keyboard module on a raspberry pi, but I can't use pip. Is there a way I can install it in a way that works? So far I have tried installing the extracted zip file from the pypi website, but nothing, not even the example code, works. I have attached a picture of what error I am getting when running the example code that comes in the folder. Thanks anyone for your help. Error message:

How do I fix this python converting file into an app - still have not found a solution

This question is not a duplicate of this question, because I am trying to create an app.
I am currently following this tutorial, but when I try to run my app,
my command prompt prints out this error:
Why does this error happen and how can I solve it? I read through all the answers to the linked question, but none of them are pertinent to my problem.
Please anyone help me, I still haven't found a working solution; I am getting desperate!!!
Edit: I can't just install and uninstall pynput? Idk why it doesn't work because shouldn't pynput come with idle?
Version: 3.74 python idle, most updated version of pyinstaller
The following might help you if you haven't tried them already:
Update pip from the command line
Unistall pyinstaller
Re-install pyinstaller and try it again
If the above does not work, try running the following command in the command line. Make sure there are some print statements in your code to see if it works.
python monitoring_culmination_product.py
If you got a message saying "python is not recognised as an internal or external command" then python might have not been added as an environment path.Try this to fix the issue.
You could always re-install python if things get difficult.(make sure you install the appropriate version 32-64bit)
If the command though executed without a problem. Try to use pyinstaller on another file to see if the problem has to make sure the problem has to do with pyinstaller.
From a personal experience, pyinstaller can be unreliable at times so I put the following line in my projects just to make sure. It might help you too.
import pkg_resources.py2_warn
Disclaimer: Although it is not specified I assume that you are using Windows
You could try to use conda create to get an environment containing all the need dependencies (numpy, etc) and then use pyinstaller as explained in this discussion.
Please fall back to 1.6.8 version of pynput. pip install pynput==1.6.8
Ref : https://stackoverflow.com/a/63721929/14759065

Can't find model 'en' in Rasa using Python

I'm new to Rasa NLU and I'm trying to train my bot by typing python nlu_model.py on the cmd.
However, it gives this error: OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a data directory.
I researched on other forums and sites how to solve this error and they recommended python -m spacy download en. It works, however...
However, I still get the error from above when I try to type python nlu_model.py in the cmd. What could be the problem in this? Thanks in advance.
P.S. I am new to Rasa and I am just following this video tutorial in Youtube: https://www.youtube.com/watch?v=xu6D_vLP5vY&t=201s
The line "you dont have sufficient privilege to perform this operation" suggests that you are lacking permission.
So could you please either run python -m spacy download en in a virtualenv or you run your terminal as Administrator. Both approaches are also described here: https://spacy.io/usage/#symlink-privilege
A working, but dirty way of solving it would be to just copy/paste the en_core_web_sm folder from the first to the second directory and renaming it as en.
It's not future-proof because you'd need to re-do it every time you update Spacy...
Using conda environments didn't work for some reasons on my limited access company laptop.

Compile errors trying to install WebRTCVAD module

I'm trying to create an app that uses the WebRTC VAD code.
I have found this: https://pypi.python.org/pypi/webrtcvad
The issue is that I cannot get it to work.
I extract the content into a folder but when It ry to run something it complains that _webrtcvad module is missing.
After a little research I tried to install the webRTC VAD module through pip. When doing this inside the folder I extracted into I get this:
When trying in another directory this happens:
How do I get this to work?
The problem was a bug in my webrtcvad's setup.py that caused it to use the wrong flags when compiling for Windows: it was using -DWEBRTC_POSIX instead of -DWIN32.
The fixed version has been pushed to pypi as version 2.0.9. I've confirmed that pip install webrtcvad works correctly on Windows 10.

Heroku ImportError: No module named tweepy - but it's installed and runs fine locally

I've made a very simple Twitter bot in Python using the Tweepy library. Everything works beautifully locally and it tweets when I run the correct script exactly as it's supposed to. However, I'd like to automate this so that it tweets a couple of times a day, so have tried using the Heroku Scheduler for this.
I'm able to push to Heroku with no problems, but when I try to run the worker on Heroku I get this error message (which means of course the scheduler isn't working either since it's running the same process):
Running `worker` attached to terminal... up, run.8157
/app/.bash_profile: line 6: parts: command not found
Traceback (most recent call last):
File "/app/workspace/botlovesyou/lovescript.py", line 4, in <module>
import tweepy, time
ImportError: No module named tweepy
So, erm...what now? I've Googled and found this but am not sure how to actually fix it. This question looks deceptively similar but I don't have the other missing dependency that caused his issue.
I've tried running pip install tweepy again but of course it says 'Requirement already satisfied'. I've tried pip uninstalling it then pip installing it again - it reinstalls no problem, but I get the same error when it's on heroku. I've also tried installing the buildpack mentioned at the link above but it failed to build and wouldn't allow me to push so I removed it.
EDIT: I've now also tried git cloning and installing tweepy using setup.py. Again, installation ran with no errors but Heroku still says there's no module named Tweepy.
Tweepy is definitely installed in the site-packages directory. What am I missing?
Many thanks.
Problem resolved (this problem, anyway).
Install was aborting when it reached PIL in the requirements.txt file - it can't be installed via pip and was just skipping installing everything after it. I don't require PIL for this project so just removed it from requirements (I don't really know why it was in requirements in the first place, I think it was a nitrous.io preinstall). Very simple solution in this case.
Edited to add - on starting a new Python box on Nitrous, PIL was preinstalled correctly. So I think my initial install might have been corrupted.
Ugh. Edited again. Nitrous seems to have eaten PIL again, or maybe Heroku has. Same error. Again removed it from requirements.

Categories