Closed geoexploring closed 3 years ago
按照 PaddleX API开发模式安装 输入pip install paddlex==2.0.0rc4 -i https://mirror.baidu.com/pypi/simple
也会报numpy的错:
(venv) C:\Users\xxx\Desktop\xxx>pip install paddlex==2.0.0rc4 -i https://mirror.baidu.com/pypi/simple
Looking in indexes: https://mirror.baidu.com/pypi/simple
Collecting paddlex==2.0.0rc4
Using cached https://mirror.baidu.com/pypi/packages/db/f0/7025496b2cbe60971def5f6560d74054d1b6a08c9042aa99d524676fe8ec/paddlex-2.0.0rc4-py3-none-any.whl (992 kB)
Collecting visualdl>=2.1.1
Using cached https://mirror.baidu.com/pypi/packages/31/99/f5f50d035006b0d9304700facd9e1c843af8e02569474996d1b6a79529f6/visualdl-2.2.0-py3-none-any.whl (2.7 MB)
Collecting numpy>=1.13.3
Downloading https://mirror.baidu.com/pypi/packages/eb/a9/1e4215043cac5ffc6a5ab1f2e0e58a680fc8fd19e28eb28c01e90aeace3e/numpy-1.21.1-cp37-cp37m-win_amd64.whl (14.0 MB)
|████████████████████████████████| 14.0 MB 656 kB/s
............省略部分库的安装..............
Collecting idna<4,>=2.5
Using cached https://mirror.baidu.com/pypi/packages/d7/77/ff688d1504cdc4db2a938e2b7b9adee5dd52e34efbd2431051efc9984de9/idna-3.2-py3-none-any.whl (59 kB)
Building wheels for collected packages: future, lap, py-cpuinfo
Building wheel for future (setup.py) ... done
Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=76beff170f935cd7074d2323d990ee62d24442bd181997595c3f5b220e4442bb
Stored in directory: c:\users\xxx\appdata\local\pip\cache\wheels\59\7f\60\55701d947bd3c04ab86cdc04064d4814e6c7708cac8920508b
Building wheel for lap (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\xxx\Desktop\xxx\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-lo_3894m\\lap_a9fd5f9909494f41a66958a1a0a3ef4a\\setup.py'"'"'; __file
__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-lo_3894m\\lap_a9fd5f9909494f41a66958a1a0a3ef4a\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'
"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\xxx\AppData\Local\Temp\pip-wheel-flucxpyq'
cwd: C:\Users\xxx\AppData\Local\Temp\pip-install-lo_3894m\lap_a9fd5f9909494f41a66958a1a0a3ef4a\
Complete output (12 lines):
Partial import of lap during the build process.
Traceback (most recent call last):
File "C:\Users\xxx\AppData\Local\Temp\pip-install-lo_3894m\lap_a9fd5f9909494f41a66958a1a0a3ef4a\setup.py", line 127, in get_numpy_status
import numpy
ModuleNotFoundError: No module named 'numpy'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\xxx\AppData\Local\Temp\pip-install-lo_3894m\lap_a9fd5f9909494f41a66958a1a0a3ef4a\setup.py", line 236, in <module>
setup_package()
File "C:\Users\xxx\AppData\Local\Temp\pip-install-lo_3894m\lap_a9fd5f9909494f41a66958a1a0a3ef4a\setup.py", line 220, in setup_package
raise ImportError('lap requires numpy, '
ImportError: lap requires numpy, please "pip install numpy".
----------------------------------------
ERROR: Failed building wheel for lap
Running setup.py clean for lap
Building wheel for py-cpuinfo (setup.py) ... done
Created wheel for py-cpuinfo: filename=py_cpuinfo-8.0.0-py3-none-any.whl size=22257 sha256=57645484d85408d1a613b6b394616caf501d3daf4d019e8573091da6a37e6db2
Stored in directory: c:\users\xxx\appdata\local\pip\cache\wheels\9c\57\dd\323247bc3b04fce7bc3fa4c25c106b87f2c13888c240b68723
Successfully built future py-cpuinfo
Failed to build lap
Installing collected packages: zipp, typing-extensions, pyparsing, MarkupSafe, importlib-metadata, colorama, Werkzeug, toml, six, pytz, py, pluggy, platformdirs, packaging, Jinja2, itsdangerous, iniconfig, filelock, distlib, click, backports.entry-points-selectable,
attrs, atomicwrites, virtualenv, urllib3, pyyaml, python-dateutil, pytest, pyflakes, pycryptodome, pycodestyle, py-cpuinfo, pillow, numpy, nodeenv, mccabe, kiwisolver, idna, identify, future, flask, cycler, charset-normalizer, cfgv, certifi, Babel, xmltodict, tqdm,
threadpoolctl, shellcheck-py, scipy, requests, pyzmq, pytest-benchmark, protobuf, pre-commit, pandas, opencv-python, matplotlib, joblib, Flask-Babel, flake8-import-order, flake8, bce-python-sdk, visualdl, shapely, scikit-learn, paddleslim, motmetrics, lap, paddlex
Running setup.py install for lap ... done
DEPRECATION: lap was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issue
s/8368.
Successfully installed Babel-2.9.1 Flask-Babel-2.0.0 Jinja2-3.0.1 MarkupSafe-2.0.1 Werkzeug-2.0.1 atomicwrites-1.4.0 attrs-21.2.0 backports.entry-points-selectable-1.1.0 bce-python-sdk-0.8.61 certifi-2021.5.30 cfgv-3.3.0 charset-normalizer-2.0.4 click-8.0.1 colorama
-0.4.4 cycler-0.10.0 distlib-0.3.2 filelock-3.0.12 flake8-3.9.2 flake8-import-order-0.18.1 flask-2.0.1 future-0.18.2 identify-2.2.11 idna-3.2 importlib-metadata-4.6.3 iniconfig-1.1.1 itsdangerous-2.0.1 joblib-1.0.1 kiwisolver-1.3.1 lap-0.4.0 matplotlib-3.4.2 mccabe-
0.6.1 motmetrics-1.2.0 nodeenv-1.6.0 numpy-1.21.1 opencv-python-4.5.3.56 packaging-21.0 paddleslim-2.1.0 paddlex-2.0.0rc4 pandas-1.3.1 pillow-8.3.1 platformdirs-2.2.0 pluggy-0.13.1 pre-commit-2.13.0 protobuf-3.17.3 py-1.10.0 py-cpuinfo-8.0.0 pycodestyle-2.7.0 pycryp
todome-3.10.1 pyflakes-2.3.1 pyparsing-2.4.7 pytest-6.2.4 pytest-benchmark-3.4.1 python-dateutil-2.8.2 pytz-2021.1 pyyaml-5.4.1 pyzmq-22.1.0 requests-2.26.0 scikit-learn-0.23.2 scipy-1.7.1 shapely-1.7.1 shellcheck-py-0.7.2.1 six-1.16.0 threadpoolctl-2.2.0 toml-0.10.
2 tqdm-4.62.0 typing-extensions-3.10.0.0 urllib3-1.26.6 virtualenv-20.7.0 visualdl-2.2.0 xmltodict-0.12.0 zipp-3.5.0
严格按照官方给的安装过程就不会出现上述问题,我的具体步骤是:
python -m pip install paddlepaddle-gpu==2.1.1.post112 -f https://paddlepaddle.org.cn/whl/mkl/stable.html
pip install paddlex==2.0.0rc4 -i https://mirror.baidu.com/pypi/simple
pip install cython -i https://mirror.baidu.com/pypi/simple
pip install git+https://gitee.com/jiangjiajun/philferriere-cocoapi.git#subdirectory=PythonAPI
git clone https://github.com.cnpmjs.org//PaddlePaddle/PaddleX.git
cd PaddleX
pip install -r requirements.txt -i https://mirror.baidu.com/pypi/simple
python setup.py install
问题类型:其它
PaddleX版本
您使用的PaddleX版本 2.0.0-rc4
问题描述
win10 下
import paddlex
报numpy的错========================
请在这里描述您的问题
请问是什么原因导致的呢? 谢谢