I'm trying to install Google's or-tools on mac 10.10 - https://code.google.com/p/or-tools/wiki/OrToolsWithPyPi .
I install using python2.7 setup.py install --user (tried also with sudo and without --user) but get the following when it goes to pypi to download the package:
.. Some other output ..
Installed /Users/Zach/Library/Python/2.7/lib/python/site-packages/ortools_examples-1.3549-py2.7.egg
Processing dependencies for ortools-examples==1.3549
Searching for ortools
Reading https://pypi.python.org/simple/ortools/
No local packages or download links found for ortools
error: Could not find suitable distribution for Requirement.parse('ortools')
I noticed that it creates the directory build/bdist.macosx-10.8-x86_64/egg in order to build everything in but I'm running macosx 10.10.
When looking in https://pypi.python.org/simple/ortools/ I can see a matching egg file for version 3549 but it's for macosx10.9, could that be the problem? Why does setup.py thinks I'm on 10.8?
Anyway, it might not be the problem, so any other help is very appreciated. Thanks!
Former solution (using easy_install and egg file)
I temporarily solve the problem of installing by installing or-tools using easy-install directly from the egg file (I use easy-install installed from MacPorts). Here is how I install it.
sudo easy_install-2.7 https://pypi.python.org/packages/2.7/o/ortools/ortools-1.3853-py2.7-macosx-10.9-intel.egg#md5=f1f23b375652d40b9fbce682302e8dc8
Here is the link address for or-tools egg file that I use: https://pypi.python.org/pypi/ortools/1.3853
It will give some warning but I can load or-tools in Python by using import ortools with no problem.
New solution (using pip)
I can now install ortools using pip. However, default protobuf version is 2.6.0 so I have to uninstall and reinstall new protobuf version that works with ortools (e.g. in this case, we will do 3.0.0b4).
pip install protobuf==3.0.0b4
pip install ortools
Note that ortools is only compatible with Python 2.6, 2.7, and 3.2 not 3.5 yet
Now or-tools support python 3.5 and python 3.6.
also please notice v6.6 will require protobuf 3.5
cf requirement https://github.com/google/or-tools/blob/master/Dependencies.txt
Related
I am trying to install tobii_research for a project and I was following the instructions on http://developer.tobiipro.com/python/python-getting-started.html
I already have python 3.7.6 and pip 21.1.2 installed on my Mac.
When I run pip install tobii-research I get:
ERROR: Could not find a version that satisfies the requirement tobii_research (from versions: none)
ERROR: No matching distribution found for tobii-research
Was there something I forgot to install?
I can not for the life of me figure out how to install this manually either.
Help with pip, or installing manually would be greatly appreciated, but you might have to explain it to me like I am stupid.
Thanks in advance.
It appears that you are not running the correct python version for the versions of the package that are available. If you look at the wheel files available on the tobii-research Downloads page, the software is packaged for either python 2.7 or 3.6.
When trying to install this package myself, I get the same error message as you when trying to install it for python 3.8, but the package installs successfully with my python 2.7 installation.
I would recommend installing a compatible version of python and then running pip through that version using the following command:
[specific_python_installation] -m pip install tobii-research
Try doing it with pip again, but replace the underscore with a hyphen as shown below:
pip install tobii-research
I saw on the PyPi website that they only have it for Python 3.8, so I downloaded that Python version from their official website and installed it (do not add it to path).
Then, I created a virtual environment selecting 3.8 as the Python version (refer to this answer) and activated that virtual environment.
Finally, I run pip install tobii_research and it worked.
One thing that helped me - required Python version. For example, for the version 1.10.2 (which is current at the moment of writing this) only Python 3.10 is supported. Check the list of files distributed within this version.
I was able to install the package on Windows with Python 3.10 but on MacOS I had the same problem and wasn't able to resolve this - I assume it's a problem with the architecture, as there is no version for arm64 if you have a Mac with M1 processor.
The Mac Book Air M1 chip doesn't seem to support pep517 according to the errors of installing third-party libraries with pip or brew. Even using these methods without pep517 downloading the library locally didn't work. How does one circumvent this?
Error from using pip install pandas:
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I've tried this:
pip install <lib>
installing the library locally and trying to install with pip without pep517
brew install <lib>
openblas installation of lib
python env on the intel venv
I had the exact same problem, with a different library but with the same error code for PEP 517, I was using python 3.9 at the time, I checked the docs and found out that it's a problem with the python version for the library, downgraded to Python 3.6 and voila! it worked.
Basically try downgrading to Python 3.6 and check.
Installing python libraries through Anaconda seems to work. I simply downloaded the installer and could later use the libraries globally. If someone has a better in-depth explanation, feel free to comment.
I was having the same message when trying to install a different package. I solved by removing the CommandLineTools and installing it again. The steps were:
sudo rm -r /Library/Developer/CommandLineTools
wait for command prompt...
xcode-select --install
This solved the issue for me.
When I run pip3 install apache-airflow (I used brew install python to install the latest version of Python locally first), I get a number of errors while building wheels for psutil and setproctitle ending with the following:
ERROR: Could not build wheels for setproctitle which use PEP 517 and cannot be installed directly
Running the command with the --use-deprecated legacy-resolver indicated in the note on the start page has the same result.
What else am I missing that is preventing a successful install on Airflow on my machine?
Which python version do you have?
And what airflow version do you wish to install?
Since you said you've upgraded to the latest python version, I'm assuming you have 3.9.1. on your local machine.
Airflow is not supporting python 3.9 so you will need to use an older version of python.
I used python 3.7 to install airflow 1.10.10 (after which you can patch up to the latest version 2.0).
If using pip does not work (like what happened to me), try using pyenv to install python earlier versions. You might also (re)install zlib to get it to work brew reinstall zlib bzip2
Since I had no pyenv installed, I had to go through the pain of upgrading homebrew to be able to do this (see steps here in case you need it)
I am trying to follow to the installation guide on tensorflow.org and have installed Python version 2 again for that reason using Homebrew.
When I run the installation as described
$ pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
I get this error message:
tensorflow-0.5.0-py2-none-any.whl is not a supported wheel on this platform.
I am obviously doing something wrong, but have no idea. Any clues?
I do not want to use virtualenv, since anaconda already comes with its own environment management conda. When installing the newest version 0.6.0 directly with pip install, I had a similar error. It seemed to not resolve the dependencies correctly.
Here is what you can try:
Install anaconda
Create a new conda workspace
Download the specific protobuf version that tensorflow needs: https://pypi.python.org/pypi/protobuf/3.0.0a3
Install it via sudo easy_install ~/Downloads/protobuf-3.0.0a3-py2.7.egg
Install a numpy version greater than 1.08.x via conda install numpy
Download the 0.6.0 version of tensorflow: https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py2-none-any.whl
Install via pip install ~/Downloads/tensorflow-0.6.0-py2-none-any.whl
When you install tensorflow from the whl file directly, it should tell you when dependencies are not there. It seems not to be able to resolve these conflicts independently. My setup had issues with protobuf and numpy. After installing them manually everything worked fine.
I hope this helps!
It seems to be a common issue. Try to install it in the virtualenv. Its a much better solution, as you can always easily set up a new version of tensorflow without conflicts.
VirutalEnv Tutorial:
http://tensorflow.org/get_started/os_setup.md#virtualenv-based_installation
On the Mac, I didn't have any problem installing tensorflow with the anaconda version of python: https://www.continuum.io/downloads
The anaconda version also provides science, math, engineering, and data analysis packages. A lot of people on https://www.kaggle.com/ seem to use this...just a thought.
I have both Python 2.7 and Python 3.4 (and have to have both because for the class I'm running, students have the option of using either). One student has used Python 2.7 and numpy for their project, but when I attempt to install numpy, it installs it to 3.4. I need to install it to 2.7.
I'm using numpy 1.9 from this site, which I'm told is also 2.7-specific: http://sourceforge.net/projects/numpy/files/NumPy/
However, nonetheless it still goes to the 3.4 folder. Copying it to Python 2.7 didn't work, obviously.
How do I do this?
I recommend installing with pip.
pip install numpy
If this doesn't work on windows then download the binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and convert it to a wheel before installing.
pip install wheel
wheel convert path/to/binary
pip install numpy_wheel
Pip is recommended because you can uninstall.
To check where you are installing to
pip -V
You may have an environmental variable path to the wrong pip.
Assuming that you are using, or at least you should use pip to install the library. You can specify the python version to be installed by changing the suffix, e.g. pip-2.7 install numpy.
pip install numpy
pip-2.7 install numpy
pip-3.4 install numpy
As an alternative, in case that you do not want to use pip is to download and install the library using setup with a similar technique.
python setup.py install
python2.7 setup.py install
python3.4 setup.py install
Your PATH isn't setup correctly.
C:> where pip
Should tell you which pip it is trying to use, and it is likely whichever one it found on your PATH first...
So, instead, you will want to run it as
C:> C:\mypython2install\pip.exe install numpy
Or, setup your path correctly. See here
Just one other note on issues like this. I had a similar problem with Python 2.7 libraries not being found, because I had miniconda installed for a Python virtual environment that was hijacking calls to python from other programs. After deleting the minconda directory in my home the problem went away and python libraries that were properly installed were found again.
Note-This answer is particularly for Windows PC which has both Python2 & Pyhton3 installed on it.
Both the versions of Python has their different directories somewhat like
"C:\Python27\" ----for python2
"C:\Python35\" ---- for python3
*(or it depends on what path you chose while installing Python**)*
pip GENERALLY exist under the directory "C:\Python**\Scripts"
there you can find exe files like:
pip.exe/pip2.exe/pip2.7.exe ----for python2
pip3.exe/pip3.5.exe ----for python3
to install packages on python2:
use
Python27\Scripts\pip2.exe install package_name
(where the 1st argument is the path of exe file, it might differ for your system)
to install packages on python3:
use
Python35\Scripts\pip3.exe install package_name
there is no need to uninstall any version of python to achieve the task.