I am trying to run a python script with locateonscreen in it.
However it errors as pyautogui needs scrot and I cannot install this. I have tried
sudo apt-get install scrot
and get a 'Package scrot has no installation candidate' error.
I have checked it is already installed by running a scrot test.png command and confirmed it is not.
Is there any other available installer. I did look at building from the source code and that didn't work either although I suspect that is as it is something I have never done before.
I did look at building from the source code and that didn't work either although I suspect that is as it is something I have never done before.
Any ideas appreciated.
Related
The problem
Right now I am trying to set up a virtual development environment on a macOS in pycharm.
The issue that I am facing is with this command
pip install -r requirements.txt
I am using python 2.7 right now and I am needing to install reportlab==2.4
I also get an error message when I try to install reportlab outside of pycharm and outside of my venv, that is if I explicitly do
pip install reportlab==2.4 in the terminal
I will include some of the screenshots of the errors but it is about 800+ lines of output going through the process of copying, creating, and displaying syntax error messages/other errors.
Something else that I have noticed is that a lot of the errors start with 'cc' which might be an issue because I am writing in pycharm on a mac and there might be some dependencies that I am missing/I don't have support for C code somewhere? I have installed xcode command tools already but the version of gcc might be too new/too strict? the version is xcode-select version 2384
I have tried a lot of things to get this working but cannot seem to crack it.
I will try to answer questions as I see them but in the meantime, if you have any suggestions, I am open to anything.
Thanks!
** UPDATE **
I did see that most of these were just warnings.
I managed to find a command that suppressed these warnings and allowed reportlab==2.4 to install correctly.
CFLAGS="-Wno-error=implicit-function-declaration" pip install reportlab==2.4
I've been trying to install MusicBot for Discord and got the above error when I ran it. I also get the same error while trying to install RedBot or doing pip install unroll. I'm on a Windows 10 computer and have Python 3.7.0b4. I've looked at other people's solutions but they either used sudo or just didn't work for me. I've already tried pip install --upgrade setuptools as well as pip install ez-setup and neither of them have done anything. Any help would be appreciated.
I managed to fix my main issue, the music bot. It was probably because it only works with python 3.5.4, not 3.7 which is what I used to have. However, pip install unroll still doesn't work and continues to give me the same error, even on another computer that's also running Ubuntu. But I'm not too worried about that so I'm not looking to fix it. Thanks for the help though.
I've been working with Python for a little while now but have come to absolutely detest installing new modules. It always seems to take me a full work day to install one additional module. This last happened with mpl_toolkits and now it is happening with gdal.
The main issue seems to be that easy_install/pip/get-app aren't saving a file in the correct location and so Python (I'm using Spyder) can't find it. How do I install a module in a location so that Python can find it?
I have been reading guides, articles, manuals and Stack Overflow articles all day now and I feel this needs a new question as I can't find an answer.
It is installing fine, it's just Python (and I) can't find it
It's not in the /lib/python2.7/site-packages folder, which seems to be the Python default, although half the modules that do work aren't in there when I list it
I installed using:
sudo apt-get install gdal-bin
I also tried with:
pip install gdal
but this fails with the error:
Command "python setup.py egg_info" failed with the error code 1 in /tmp/pip-build-NWJT2f/gdal/
I looked for the files using
dpkg -L gdal
and then added the file path this said into Spyder's preferences option for PYTHONPATH, but it still couldn't find it and so I'm guessing this is wrong.
I have read the official documentation of PYTHONPATH, but it's very short and doesn't really explain it at all.
I recommend trying anaconda or miniconda, which manage environments and install packages - it 'just works'.
https://www.continuum.io/downloads
I want to install the python library Mahotas on my Raspberry Pi 2 which runs rasbian, a special version of Debian. However, when I tried to use sudo apt-get install python-mahotas I got an error saying that the lib did not exist.
I then downloaded mahotas via the browser in the GUI hoping it would work that way. I unpacked the zip file into home/pi/Downloads/mahotas-1.4.0/ and ran python setup.py install It now returned an error saying that it needed setup tools in order to be installed correctly.
After some research on the internet, I installed those setup tools, using sudo apt-get install python-setuptools, which were now in the directory /usr/lib/python2.7/dist-packages/. Setup.py, in the mahotas directory, still said I needed setup tools so I copied the setup tools folder into the mahotas directory thinking that it might solve the problem to get them in the same directory. It did not.
I have googled a lot but I could not solve the problem. Does anyone know what the problem is with my attempts to install mahotas? I am new to linux so it might be something simple but i cannot find any solution.
Update 31-08:
I have tried what Dave suggested in the comments, but after some tries it still didn't work. The first command returned a bunch of 404's . The reason that I at first thought it would still work was because my internet does weird things, sometimes giving an error. That was not the case here I discovered later.
Does anyone else have a solution?
and thanks to anyone who gives some of their time to consider my problem.
What I need help on is for someone to give me a simple and accessible explanation on how to install that module. I have never, ever used anything from PyPi before, I have only heard of pip after looking up PyCallGraph.
I'm not a programmer first, I'm doing an accounting internship and am using python to write scripts to help me speed up some processes, at the urging of a colleague who himself uses python. I write scripts using Notepad++ and execute them through IDLE.
I'm currently working on optimizing a script I wrote and came upon PyCallGraph while checking this very site on tips on how to do so.
I tried the very minimalistic instruction of just doing "pip install pycallgraph" just about anywhere I could think of, including cmd.exe, to no avail. Runing get-pip.py directly seems to have worked for installing pip, though.
Otherwise I can always just stick with the cProfile printout and write-off using modules needing such an install, although that saddly seems to be quite a few...
Step 1: Install PIP
Open terminal (cmd.exe, PowerShell, whatever)
Download get-pip.py and place it in the working directory of your terminal
Install PIP by invoking python get-pip.py
Confirm that PIP was installed correctly by invoking command pip (should display help if success)
If pip didn't work, make sure your PATH environment variable has been set up correctly. In typical Windows installations pip is installed under c:\Python27\Scripts. Make sure this folder is included in PATH.
Step 2: Install your library with PIP
Invoke pip install pycallgraph
PIP installs the library and it can be now used from Python