(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.
Related
I have created a new virtual environment with nothing else in it and I try to install
pip install scipy==1.4.1
However this returns the following error
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
This has been solved before by running
pip install --upgrade pip
However this does not work for me and I get the same error as before. If however I try and install the latest version of scipy there are no issues. Does anyone know a way around this? Maybe I need a less up to date version of python but I am really not sure.
Probably your python version is too new for this specific scipy version, use a earlier python version to solve the problem.
Install a specific python version (i.e. 3.7.4) from https://www.python.org/downloads/
Create virtual environment with pipenv:
pipenv shell --python 3.7.4
(and activate virtual environment)
Install scipy==1.4.1
Configuration:
macOS 10.14
Python 3.7.1
I am trying to install pycocotools and openpifpaf by issuing this command that should install openpifpaf and pycocotools:
pip3 install 'openpifpaf[train,test]'==0.5.2
as it is mentioned in my project work.
I looked at previous similar questions and tried to update setuptools and wheels, it did not help.
Basically the final message error are:
ERROR: Failed building wheel for pycocotools
ERROR: Failed building wheel for openpifpaf
I can provide more details on the error if necessary, I have no idea of how to fix it.
pycocotools is a bit special. It requires pre-installed Cython and numpy and pure pip cannot handle an order in the dependencies. You have to run pip3 install numpy cython before you can install openpifpaf with the train dependency.
I hope you find openpifpaf useful. Feel free to open an issue for this kind of question; I would have seen that earlier.
I had the same error for when I tried pip install pycocotools to my virtual environment venv. Installing pycocotools has other package dependencies - I'm not sure which exactly but it's among these here which are installed in venv. Probably just numpy and cython are necessary, but I haven't tested that.
Make these dependencies findable by adding venv to the PYTHONPATH in ~./bash_profile:
export PYTHONPATH="${PYTHONPATH}:path/to/venv"
I need to get pip install plyfile to succeed in my python 3.6.2 (anaconda3 5.0.0 64-bit) environment so that I can execute from plyfile import PlyData, PlyElement in script to enable use of pca dimensional reduction algorithms.
I searched for "pip install plyfile" hits and found articles on this site, here and here, that just comment on executing the command nothing that touches on the errors i'm seeing in screen grab below.
I executed pip.exe search ply | findstr /r /i /c:"^ply" and the result set contains a plyfile (0.5) entry so not sure why pip install plyfile is throwing errors and conda install plyfile failing to find it.
I tried issuing the pip.exe install command using the fully qualified path, e.g. "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts\pip.exe" install plyfile, and that doesn't change the result nor does executing it while having that directory as the current directory.
I tried installing current Anaconda3-5.0.1-Windows-x86_64.exe and Anaconda3-5.0.1-Windows-x86.exe distributions and then executing c:\ProgramData\Scripts\pip.exe install plyfile using those latest installs and I get the same result as below where it produces a bunch of error output.
I've captured the stdout with error details shown in first screen grab below, the last line of it being TypeError: parse() got an unexpected keyword argument 'transport_encoding' if that points to something specific, and made it available here.
Any suggestion from others who ran into this with current windows 10 [ v1709 fall creators update ] and anaconda3 5.0.0 x64 python 3.6.2 environment?
You need to install pip used by conda in Anaconda's Script folder.
Here are steps I would follow.
1) Open anaconda prompt or cmd prompt would do.
2) Try searching installed conda base and cd to Scripts.
For e.g. on my laptop its in
(base) c:\Anaconda3\Scripts>
3) Install using pip install plyfile
(base) c:\Anaconda3\Scripts>pip install plyfile
Collecting plyfile
Downloading plyfile-0.5.tar.gz
Requirement already satisfied: numpy>=1.8 in c:\anaconda3\lib\site-packages (fro
m plyfile)
Building wheels for collected packages: plyfile
Running setup.py bdist_wheel for plyfile ... done
Stored in directory: C:\Users\amandra\AppData\Local\pip\Cache\wheels\1a\76\bb\
6f25f1299f66e1e8b6ce9ad4ddcb8ed5730fd83b63375c41eb
Successfully built plyfile
Installing collected packages: plyfile
Successfully installed plyfile-0.5
4) Check if package is installed using
conda list
pkginfo 1.4.1 py36hb0f9cfa_1
ply 3.10 py36h1211beb_0
plyfile 0.5 <pip>
progress 1.3 py36hbeca8d3_0
Hope this helps.
Searched on TypeError: parse() got an unexpected keyword argument 'transport_encoding' and found this SO q&a with fix being to execute conda install pip to update pip version. After that pip install plyfile worked as expected.
I am trying to install ggplot for Python using
pip install ggplot
but I get an error message saying
I am using Python2.7 on Windows8. I looked at the suggestions and among other things tried the suggestion here
pip install wheel to install support for wheel files.
pip install ggplot-0.11.5-py2.py3-none-any.whl to install the wheel. I downloaded the whl file from here.
Upon doing this I got further messages saying:
Failed building wheel for scipy
Failed cleaning build for scipy
In addition I still get the original error message.
Please provide suggestions.
After trying all possible things suggested in various forums this is what worked for me:
Download numpy-1.11.2+mkl-cp27-cp27m-win_amd64.whl and scipy-0.18.1-cp27-cp27m-win_amd64.whl files from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy to C:\Python27\Scripts directory.
Run the following commands from the DOS command window in windows
pip install numpy-1.11.2+mkl-cp27-cp27m-win_amd64.whl
pip install scipy-0.18.1-cp27-cp27m-win_amd64.whl
They were both successfully installed.
Finally
pip install ggplot
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.