I'm using Python 3.7 on Arch Linux.
I've been trying to install Mayavi with pip but it always fails when installing vtk. So I found out that even when trying to install vtk by itself via pip (which should work) that vtk is really not installing. I get this error:
$ sudo pip3 install vtk
Collecting vtk
Could not find a version that satisfies the requirement vtk (from versions: )
No matching distribution found for vtk
This seems like a very dumb error on my part, but I really can't understand what's going on. VTK should be compatible with Py3 now as far as I know. pip was installed with get-pip.py and everything else has always worked perfectly.
Curiously enough, pip2 install vtk mayavi works.
Any ideas?
PS.: I'm avoiding creating a separate environment for work-related issues.
EDIT
I did the manual approach:
$ wget https://pypi.python.org/packages/13/7f/735fbc0dd78c91ad3693cfdfe5c91603899fc8e24909f935d46d2fde6559/vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl
$ sudo pip3 install vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl
vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.
Which I don't know what's causing. I've tried to follow this answer but I can't make the first pep command work.
Could not find a version that satisfies the requirement vtk (from versions: )
Among the currently released files there are no binaries for Python 2.7 and there is source code. Either you should try a different version of Python (2.7, 3.4-3.6) or compile/install VTK from sources.
vtk-8.1.0-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.
You're trying to install a Python 2.7 binary wheel for Python 3.7. That's impossible.
The wheel has not been published on pip yet, you can download and install one from vtk.org directly : https://vtk.org/download/
You can manually compile the VTK version packages you want and put them in the dist-Packages directory.I have a specific method.
Related
I am new to Python and terminal prompts/installs and I keep running into installation errors when trying to install modules like Pandas.
I have successfully installed "pip install pandas"
I am unable to install this with pip3 however.
Collecting pandas
Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas
I have pip3 installed and python3(this comes with mac os).
I do not understand the conflict between the versions. If I install using pip, its only compatible with python2?
Why wouldnt I be able to install it using pip3 (see error above)?
Am I somehow installing in the wrong directories or not making the correct distinction for python3 and pip3 version compatibility? Thanks for any insight.
As already said in the comments, pip installs modules for python2. Also, you can't run pandas as a command on the shell.
pip3 install pandas works for me, on python3 (v3.7.4), which was installed directly from a Mac installer package on the python website. No 'environment configuration' was required.
>pip3 install pandas
Collecting pandas
Downloading https://files.pythonhosted.org/packages/ab/ba/f97030b7e8ec0a981abdca173de4e727b3a7b4ed5dba492f362ba87d59a2/pandas-1.0.1-cp37-cp37m-macosx_10_9_x86_64.whl (9.8MB)
100% |████████████████████████████████| 9.8MB 2.8MB/s
If you've installed python3 using some different method, then you may need to install packages differently or configure your python installation in some way.
I am able to install the python3 package of forexconnect using:
python3 -m pip install forexconnect
but when I try to install it for pypy using:
pypy3 -m pip install forexconnect
I get the following error,
ERROR: Could not find a version that satisfies the requirement forexconnect (from versions: none)
ERROR: No matching distribution found for forexconnect
I have looked through the pypy documentation and can't work out what I need to do now. Perhaps I need to re-compile/rebuild the library but unfortunately my knowledge of python isn't good enough to understand what is probably quite straight-forward.
Please, does anyone know what is going on here and what needs to be done?
forexeconnect does not release a source tarball, so they must build a binary version for each python version they wish to support and upload that to PyPI. Most packages will release a source tarball and upload that to PyPI, then pip install can build the binary package from source. In this case, the package provider (assuming they do not want to release the source) would have to build a version for PyPy, there is nothing pip nor PyPy can do.
To see supported versions by pip try
pip install forexconnect==0
Then you can set specifical version with
pip install forexconnect==versionnumber
I'm sure there have been others who had this same problem, but those kind of posts of been difficult to track down or don't help resolve my issue.
I'm trying to get an old Django project from 2015 up and running but it keep encountering runtime errors on the newer version of Django and Python. This project was originally built in Django 1.6.5 using Python 3.2.2, so I'm trying to recreate that dev environment so I can see the project working and hope to bring it up to standard with at least Python 3.4 and Django 1.11.
I have Python 3.2.2 installed, but I've run into problems getting Pip to install. I'm aware that Pip wasn't bundled with Python until 3.3, so I'm trying to install it myself using get-pip from https://bootstrap.pypa.io/3.2/get-pip.py. When I execute this script it returns an error.
PS F:\temp> python get-pip.py 7.1.2
Collecting 7.1.2
Could not find a version that satisfies the requirement 7.1.2 (from versions: )
No matching distribution found for pip 7.1.2
I found this post (Install pip<v8 in python3.2) that led me to bootstrap.pypa.io, but the solutions there isn't helping.
Am I installing pip 7.1.2 correctly, or does it just flat out not exist anymore in 2018?
setuptools dropped support for Python 3.2 at version 30.0 so first thing is to downgrade setuptools:
pip install -U 'setuptools<30`
Then download wheel for version 7.1.2 and install it:
pip install -U pip-7.1.2-py2.py3-none-any.whl
If that still doesn't work: download source code, untar the archive and run
python setup.py install
How do you download matplotlib to windows so I can use it with python?
Every other question related to this that I've found on StackOverflow has led to the same problem which is that it keeps giving me the error:
python setup.py egg_info failed with error code 1 in C:\Users\Myname\AppData\Local\Temp\pip-install-9gc765gs\matplotlib\
Things I have tried (from the command prompt):
pip install matplotlib
pip install matplotlib-1.5.0-cp35-none-win_amd64.whl (which is the file I downloaded from SourceForge and is now stored in my computer)
pip install "matplotlib-1.5.0-cp35-none-win_amd64.whl"
python -mpip install -U matplotlib
I even tried tried:
pip install --upgrade setuptools
python -mpip install -U pip
prior to using the other commands to make sure everything was up to date.
Any help would be very appreciated.
Matplotlib has not been officially released for Python 3.7 yet.
As of this writing, a 3.7 version for Mac and Linux has been uploaded to PyPI earlier today, which means the Windows versions are probably coming very soon. pip will probably work after that.
Similarly, no 3.7 compatible versions have been put onto conda-forge or integrated into the main conda repo yet. I'm sure those will be coming in the next couple of weeks.
Until then, maybe installing from source will work?
I am trying to install the OpenCV-python on my mac and i have used the following:
$pip install opencv-python
which gave me the following error:
$pip install opencv-python
Collecting opencv-python
Using cached opencv_python-3.4.0.12-cp27-cp27m macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting numpy>=1.11.1 (from opencv-python)
Using cached numpy-1.14.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
Installing collected packages: numpy, opencv-python
Found existing installation: numpy 1.8.0rc1
Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Then i did try the pip install --upgrade matplotlib which didnot change anything. It just show me:
matplotlib 2.2.2 requires backports.functools-lru-cache, which is not installed.
matplotlib 2.2.2 has requirement numpy>=1.7.1, but you'll have numpy 1.8.0rc1 which is incompatible.
As I found many ways to install the openCV-python in the internet like:
https://www.pyimagesearch.com/2015/06/15/install-opencv-3-0-and-python-2-7-on-osx/
and I installed on my other mac but i got import cv2 problem alot in my codes.
I will be more than happy if anyone have a good solution or recommendation to install the openCV-python.
Thanks
In summary, macOS comes with the Python preinstalled and you should not mess with the packages installed as some system utilities depend on them.
https://docs.python.org/3.7/using/mac.html
The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. You should never modify or delete these, as they are Apple-controlled and are used by Apple- or third-party software. Remember that if you choose to install a newer Python version from python.org, you will have two different but functional Python installations on your computer, so it will be important that your paths and usages are consistent with what you want to do.
You should take a look on either venv or virtualenv.
You can read this answer: https://stackoverflow.com/a/41972262/4796844 that will get you through the basics.
In a nutshell, to solve your problem:
$ python3 -m venv ./project-name
$ . ./project-name/bin/activate
$ pip install opencv-python
And to leave the virtual environment, simply:
$ deactivate