Comments (13)
Interestingly, when I separately run sudo pip3 install pybind11
, then sudo pip3 install projectq
starts to work.
Maybe the package is not correctly specifying pybind11 as a dependency?
from projectq.
Repro steps:
mkvirtualenv tmp
pip install projectq #FAILS
pip install pybind11
pip install projectq #WORKS
from projectq.
pybind11 is correctly included in the requirements.txt
:
https://github.com/ProjectQ-Framework/ProjectQ/blob/master/requirements.txt
from projectq.
Any ideas why pip install projectq would switch from failing to succeeding after installing pybind?
from projectq.
I have no clue and I think it's really weird that pip does not install pybind despite it being a requirement.
from projectq.
Matthew thinks it's because of line 30 in setup.py, which has to build an Extension that uses pybind11. But this is before the setup call that actually installs pybind11.
from projectq.
It looks like this could work if we could tell pip to install the required libraries before building the extension module.
from projectq.
Line 146 creates an exception but doesn't raise it?
from projectq.
I think there might be a problem with the 0.2.0 package that was uploaded to pypi. If I checkout git master and do pip install .
it works. But pip install projectq
fails in the way @Strilanc mentioned, and it also fails if I download the 0.2.0 tarfile from pypi and try to run pip install .
there.
Edit: false alarm; the 0.2.0 tarfile seems to behave the same as master, so at least the uploaded archive matches git. Still a problem with getting the version from pypi, however.
from projectq.
Ok, I think I see the problem. As of version 6.0.1, pip
does a topological sort on dependencies before installing them, so that dependencies of package foo
get installed before foo
itself. Prior versions of pip
did not make this guarantee. If I create a new virtualenv on my system (ubuntu 14.04) I get the ancient system version of pip
, version 1.5.4
. In that case after collecting all the packages, pip
says:
Installing collected packages: projectq, numpy, future, pytest, pybind11, requests, py
Running setup.py install for projectq
So basically it is trying to install projectq
before pybind11
, which fails. The solution is to update pip
itself in the virtualenv:
$ pip install --upgrade pip
Then when I run pip install projectq
I get the following:
Installing collected packages: numpy, future, py, pytest, pybind11, requests, projectq
Crucially, it installs pybind11
before projectq
and everything works fine.
from projectq.
I notice a lot of install instructions often start with pip install --upgrade pip
, presumably because of stuff like this... makes me think the package should really be able to declare a minimum version of pip.
from projectq.
Thanks @Strilanc and @maffoo, this is good to know.
Also, I added the missing 'raise' in setup.py. Thanks for pointing this out!
from projectq.
My only other suggestion would be to add a note in the tutorial to let users know they might need to update pip before installing projectq itself. Aside from that I think we can close this issue.
from projectq.
Related Issues (20)
- The code of QPE. HOT 2
- No Python, can projectq be used online? HOT 10
- About Time Evolution gate
- REST API update HOT 1
- Qasm interface HOT 5
- Install fails on macOS Big Sur
- Problems running an example notebook HOT 10
- Version 0.6.1 crashes on Linux HOT 2
- Probability distribution of qubits' classical value HOT 2
- How to check if projectq is running on C++ Simulator HOT 8
- not work on macbook with M1 Chip HOT 21
- No mapper is present in the compiler engine list! HOT 1
- IonQ uses incorrect path for backend lookup in v0.7.2 HOT 1
- Implement IonQ native gates support HOT 2
- Script runs on the simulator but encounters error on real IBM QE backend regarding a non-existent 'u2' gate HOT 8
- Python 3.9.12 on OSX HOT 6
- Minor : MacOSX 3.9 Intel work but need to use python3 HOT 1
- Issue with pip installation for version 0.8.0 HOT 3
- Reporting a vulnerability HOT 1
- Breaking changes in the AQT API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from projectq.