2015-12-18 26 views
0

我正在試圖在0.17.1上爲pandas打造一個輪子。我希望它使用numpy版本1.9.2。我對那個版本的numpy已經內置$PWD/wheelhouse車輪,和其他幾個pandas的依賴,以及:當一個已經存在時,點輪正在構建一個新輪子

ls wheelhouse/ 
numpy-1.9.2-cp34-cp34m-linux_x86_64.whl python_dateutil-2.4.2-py2.py3-none-any.whl pytz-2015.7-py2.py3-none-any.whl six-1.10.0-py2.py3-none-any.whl 

然而,當我告訴pandas打造,即使我--find-links通知它的駕駛室夾,它仍然建立的numpy新輪:

$ pip --version 
pip 6.0.8 from /home/me/.pyenv/versions/3.4.3/lib/python3.4/site-packages (python 3.4) 
$ pip wheel pandas==0.17.1 --find-links=$PWD/wheelhouse 
Collecting pandas==0.17.1 
    Using cached pandas-0.17.1.tar.gz 
[... snipped, building stuff ...] 
Collecting python-dateutil>=2 (from pandas==0.17.1) 
    File was already downloaded /home/me/rebuild_numpy_py3/wheelhouse/python_dateutil-2.4.2-py2.py3-none-any.whl 
Collecting pytz>=2011k (from pandas==0.17.1) 
    File was already downloaded /home/me/rebuild_numpy_py3/wheelhouse/pytz-2015.7-py2.py3-none-any.whl 
Collecting numpy>=1.7.0 (from pandas==0.17.1) 
    Using cached numpy-1.10.2.tar.gz 
    Running from numpy source directory. 
Collecting six>=1.5 (from python-dateutil>=2->pandas==0.17.1) 
    File was already downloaded /home/me/rebuild_numpy_py3/wheelhouse/six-1.10.0-py2.py3-none-any.whl 
Skipping python-dateutil, due to already being wheel. 
Skipping pytz, due to already being wheel. 
Skipping six, due to already being wheel. 
Building wheels for collected packages: pandas, numpy 
    Running setup.py bdist_wheel for pandas 
    Destination directory: /home/me/rebuild_numpy_py3/wheelhouse 
    Running setup.py bdist_wheel for numpy 
    Destination directory: /home/me/rebuild_numpy_py3/wheelhouse 
Successfully built pandas numpy 

$ ls wheelhouse/ 
numpy-1.10.2-cp34-cp34m-linux_x86_64.whl numpy-1.9.2-cp34-cp34m-linux_x86_64.whl pandas-0.17.1-cp34-cp34m-linux_x86_64.whl python_dateutil-2.4.2-py2.py3-none-any.whl pytz-2015.7-py2.py3-none-any.whl six-1.10.0-py2.py3-none-any.whl 

勢必對pandas的版本是>=1.7.0,所以肯定這是應該的工作輪。那麼爲什麼要建造一個新的車輪呢?我如何強制它使用現有的?

回答

0

這不是輪子的工作原理。熊貓需要>= 1.7.0版本的numpy。即使已經有更新版本的numpy,你仍然試圖強制它尋找1.9.2。即使你已經在你的駕駛室目錄中,它會檢查PyPI的最新版本的numpy,因爲這是在pandas的setup.py文件中陳述的。

+0

對不起,但這並沒有太大的意義。熊貓需要一個'> = 1.7.0'版本的numpy。 '1.9.2'滿足這個要求。如果我有一個範圍內的numpy版本滿足版本限制,則不需要獲取新版本。特別是,在我的情況下,我*不想*想要獲取新版本,因爲我的代碼需要numpy 1.9.2才能工作。 –

+0

這實際上沒有任何意義。要解決它,你可以運行'pip wheel numpy == 1.9.2 pandas == 0.17.1 --find-links wheelhouse /'。另外,請看https://pip.pypa.io/en/stable/user_guide/#constraints-files – nir0s