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?
Related
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.
I am going through "Automate the Boring Stuff" and I am using Mu as a text editor. I am trying to install a particular package called pyperclip.
Since Mu has its own Python environment, I am trying to install pyperclip into its /pkgs folder. I encounter the following error:
PS C:\Users\MYUSERNAME\AppData\Local\Mu\pkgs> pip install pyperclip --target "C:\Program Files\Mu\pkgs"
ERROR: Can not combine '--user' and '--target'
I have looked around on GitHub and previous posts on learnpython and I have not found similar troubles.
My major confusion is that it says I cannot combine --user but I did not type --user.
I have a feeling the solution is elementary, but I am learning python and how to work with terminals, so I would appreciate someone teaching me what I am doing wrong.
I found this question, whose solution is to reinstall Python from the website, not from the Microsoft app store, but I am pretty sure I downloaed Python from the website. Should I re-download or would that cause more complication?
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
Did anybody manage to install pypotrace or is able to install mingwin it's like mission impossible for me I've passed the last 12 hours trying to found out how but nothing is working and description are poor please could any body help? This is where you can get it:
pypotrace web site
This problem was so much of a pain that I ported potrace to python directly rather than using hooks and requiring local compile.
pip install potracer
https://github.com/tatarize/potrace
I implemented the same API as pypotrace so it should be fairly painless.
Since you are working in windows you need the following steps:
You may need the python distutils package - pip install -U distuilts should do the job.
You will also need Cython - the windows installers are here.
You need to install mingw and make sure it is working in
msys mode - run msys and you should get a command prompt in it type
gcc --version and make sure you get a sensible reply.
also make sure your python runs from within msys
Do the required downloads:
potrace source,
agg source site broken or the GitHub zip file here,
potrace source from here and unzip it.
The follow the instructions at the link you gave and tell us where they stop working.
Trying to install mpi4py and having an issue when I run
easy_install mpi4py
and get:
error: Setup script exited with error: Unable to find vcvarsall.bat
From reading literature on similar issues I figured it is a compiler issue, but I have no idea how to implement the fix mentioned in that problem. From mpi4py documentation I found
env MPICC=/path/to/mpicc easy_install mpi4py
I am on Windows and cmd doesn't allow me to run such command. I'm not too familiar with Windows command line, so dont know how to properly implement this fix, or is this even a correct fix?
easy_install mpi4py MPICC=/path/to/mpicc isnt an option as easy_install doesnt have an argument for passing down variables.
I am using OpenMPI
EDIT 1
vcvarsall.bat file is in my VS12 folder, so most likely it is the same issue as the outlined in above case. I am using Developer Command Prompt from VS12, and no luck either
I've never had luck getting python compiles to work on windows. Luckily I've never had a compelling need for it either. Can you try the unofficial binary installer?
If you need to install it to a virtualenv, first activate your virtualenv and then use easy_install "..." with the full path to the downloaded binary.
If you really need to compile it, you'll need to follow what all the other solutions say about getting compilation to work on windows.