In order to install bfieldtools I am required to install several dependencies, one of those is a package called "Mayavi", which in itself requires the installation of two other dependencies VTK & PyQT5.
After installing these two packages, and running pip install mayavi, the installer ran smoothly until it reached the stage: Building wheel for mayavi (setup.py) ... and at this point it stays for more than 20 minutes (so far).
obviously something is faulty with the installation i just cant tell what it is.
Versions of relevant packages:
Python - 3.9.6, Pip - 21.2.4, PyQt5 - 5.15.4, Vtk - 9.0.3
Related
I'm setting up my project in MacOs and needed to install requirements (including Pillow). When I run the pip3 install -r requirements.txt, everything goes fine until I receive the following message:
ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects
I've seen similar question which answers are to upgrade pip, which I did, but the error remains the same.
I'm using Python 3.10 in a venv on MacOS
backport zoneinfo does not have wheels for python3.10. So you will have to use 3.9 or lower version till the 3.10 wheels are released.
(You can look through discussion here for additional context)
I'm trying to run a script that uses Openfermion, PySCF, Openfermionpyscf, and QuTiP packages for Python. I'm running Linux (Ubuntu) 64bit on a virtual machine (off of Win7, 64bit).
Following discussion in the links above I have managed to succesfully install Openfermion and PySCF, but get the following error upon using pip -U install qutip
Building wheels for collected packages: qutip
Building wheel for qutip (PEP 517) ... error
ERROR: Command errored out with exit status 1:
...
ERROR: Failed building wheel for qutip
Failed to build qutip
ERROR: Could not build wheels for qutip which use PEP 517 and cannot be installed directly
The "..." in the above is for the sake of brevity, as the actual error message encompasses some 299 lines.
I tried this installation in an environment with python=3.7, and with nothing else installed, but I run into errors either way.
To recreate my issue; try
$ conda create -n test python=3.7 -y
$ conda activate test
$ pip install -U openfermion openfermionpyscf pyscf qutip
Other things I have tried
Installing via. conda, which led to various errors (being unable to use modules Openfermion.chem or Openfermion.Hamiltonians as described in the original problem.
Removing the entirety of my qutip, openfermion, pyscf installations, making a new environment and reinstalling everything - tried with both conda and pip in a new environment each time.
EDIT: While I have no resolved the pip install QuTiP errors (regarding wheels), even after verying that my conda -V is 4.9.2 as desired, and after attempting an upgrade pip install --upgrade pip setuptools wheel (already up to date) I have found a work-around by install via. Conda.
As long as I install QuTiP with conda, I get no issues. And, as it turns out, the errors I previously had with conda installations were due to an outdated segment of code in the scripts I was trying to run.
While the issue is not resolved (I still cannot install via. pip), it's not imperative any longer.
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
Environment is Python 3.5 and CentOS 7.0 in VPS (XEN).
I use IUS repository for CentOS7 to install Python 3.5 and corresponding devel, setuptools packages.
Then upgrade pip3.5 itself by
sudo pip3.5 install upgrade pip
Numpy and Matplotlib can be installed by pip 3.5 without any problem.
sudo pip3.5 install numpy
sudo pip3.5 install matplotlib
But when I try to install scipy, it got stuck at the step running setup.py like forever. Only way to get rid of this is Ctrl+C. Tried several times, even reinstall CentOS and compile Python3.5 from source code. Always the same issue happens.
Collecting scipy
Using cached scipy-0.17.0.tar.gz
Installing collected packages: scipy
Running setup.py install for scipy ... \
Could someone help me out please?
update (Feb 9th 2016):
A 1.5GB swapfile is created manually, which is none originally. Then after about 2 hours waiting, it is finally installed. I guess the relatively low performance of server leads to this problem.
I have tried installing scipy using pip install scipy. I have installed all the dependencies, gcc-fortran, lapack-devel, blas-devel but to no avail. I created my virtual environment with pyvenv-3.4. Anytime I try installing scipy it hangs after these two lines
Building wheels for collected packages: scipy
Running setup.py bdist_wheel for scipy
On one trial, I waited all night and it did not install. My OS is CentOS-7. Thanks for your help.
After getting some help, I tried easy_install scipy. Same problem it stops somewhere and just hangs. I have to depress Ctrl+C to escape. How do I finish installing or reinstall it? Thanks.
Edit:
I finally fixed it by following the instructions here: http://chrisstrelioff.ws/sandbox/2014/06/04/install_and_setup_python_and_packages_on_ubuntu_14_04.html
I would recommend to use Anaconda. It comes with many packages for scientists. SciPy works out of the box. Just install as user not root. It comes with conda which is an improved virtualenv.
If you don't want all packages of Anaconda use Miniconda
You can create a new environment and install scipy:
conda create -n my_project python=3.4
source activate my_project
conda install scipy
No compilation involved.