I am trying to test a package build on travis-ci.org, but am coming up against a timeout with pip install scipy:
Installing collected packages: scipy
Running setup.py install for scipy
Running command /home/travis/virtualenv/python2.6.9/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-Fn2gmJ/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hWDx9L-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python2.6.9/include/site/python2.6
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
(extract from a recent build log).
How can I build scipy >= 0.11 on Travis without a timeout?
The solution is straightforward. Just prefix the installation command with travis_wait. More details are available at https://docs.travis-ci.com/user/common-build-problems.
The default timeout per command on Travis is 10 minutes and when you use the function travis_wait only, the timeout is 20 minutes. If your build need wait more than 20 minutes, you can pass a number of minutes to function travis_wait, exemple:
$ travis_wait 30 pip install scipy
This is a function undocumented in Travis, but it is suggested by Hiro Asari from Travis on github issue.
You could also use an approach from here, if using the commands like travis_wait provided by Travis CI isn't an option.
In my case I wanted to keep Travis running while defining steps in separate shell scripts where I had no idea how to use Travis-provided commands. The approach above worked out pretty well (if interested see the pull request).
Related
I was running a self hosted github action runner but my jobs were failing with this error message in the picture. I searched stackoverflow before posting the question but couldn't find any relevant threads. Let me know if there are threads that I missed.
How do I resolve this error so that my github action runner can run my CI builds again?
The built-in GitHub Action runners have yarn installed on them by default but a self-hosted runner won't unless you install it. See relevant issue here: https://github.com/actions/setup-node/issues/182.
If you don't want to install yarn on your self-hosted runner you can install it in the workflows that need it. Just make sure to uninstall it afterward to keep your self-hosted runners clean.
# You'll need to make sure node is installed first
- name: Install Node
uses: actions/setup-node#v3
with:
node-version-file: '.node-version'
- name: Install yarn
run: npm install -g yarn
# Do what you need to do with yarn
# Uninstall when you're done
- name: Clean up
if: always()
run: npm uninstall -g yarn
I realised that the issue was literally as described in the error that for some reason yarn was not found on my computer. This was a little strange as I remembered installing yarn before.
Nevertheless I ran
brew install yarn
And ran brew update and upgrade just in case my homebrew was outdated
brew update
brew upgrade
And it resolved the error and issues.
I installed Scipy using the command sudo apt-get install python-numpy python-scipy and looks like the latest version of both are installed. But when I try to install a python package named wfdb using pip install wfdb, it get an error while Building wheel for scipy (PEP 517).
ERROR: Failed building wheel for scipy
Running setup.py clean for scipy
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-
fhfmfpqi/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-
fhfmfpqi/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)
(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code,
__file__,
'"'"'exec'"'"'))' clean --all
cwd: /tmp/pip-install-fhfmfpqi/scipy
Complete output (9 lines):
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
----------------------------------------
ERROR: Failed cleaning build dir for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly`
I upgraded pip using pip install --upgrade pip.
python version used: 3.7
Can I get some help on this?
Clean out the install (I don't know which system you're using) i.e. get rid of the $PATH variables and just do a fresh install.
If you're using Anaconda:
conda install -c anaconda scipy
should do it
also the goops old
pip install scipy
gets it done as well. May I ask why you approached your installation in this way (again, I don't know which system you're on)
Never do sudo pip. Instead do pip install --user. Or (better) work in a virtualenv.
EDIT: typo: there is no space between -- and user.
I've been trying the BuildBot First Run tutorial. It starts by creating a master and looks quite simple and straightforward, but I've encountered problems with the step pip install 'buildbot[bundle]'.
I get this error message (this is the end of the log):
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "c:\users\remi\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Remi\\AppData\\Local\\Temp\\pip-install-10x0qptg\\Twisted\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Remi\AppData\Local\Temp\pip-record-c63k2sci\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Remi\AppData\Local\Temp\pip-install-10x0qptg\Twisted\
I've tried installing mscv build tools, but still get the same message.
Any ideas how I could fix the problem?
Problem is twisted does not yet support python 3.7 (see related issue here: Installing Twisted for Python using pip: error: Microsoft Visual Studio failed with exit status 2).
You can work around this problem by installing precompiled twisted binaries. For example from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
E.g. in your case download Twisted‑18.9.0‑cp37‑cp37m‑win32.whl and do
pip install Twisted‑18.9.0‑cp37‑cp37m‑win32.whl
Then retry the buildbot install.
pip install 'buildbot[bundle]'
I get the following error when attempting to install scipy to PyCharm 3.2:
Collecting scipy
Using cached scipy-0.19.0.zip
Installing collected packages: scipy
Running setup.py install for scipy: started
Running setup.py install for scipy: finished with status 'error'
Complete output from command C:\Users\leigh\AppData\Local\Programs\Python\Python36-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\leigh\AppData\Local\Temp\pycharm-packaging\scipy\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\leigh\AppData\Local\Temp\pip-8kx0fj8t-record\install-record.txt --single-version-externally-managed --compile:
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
Does anyone know how to deal with this?
I am not sure, but you might find your solution in this stackoverflow thread: Can't install Scipy through pip.
If your problem persists, assuming you're on Windows (10), you could try:
Clone library from Github.
git clone https://github.com/scipy/scipy.git
Using CMD, navigate to the scipy folder
cd C:\..(your path)..\scipy
Then install by
python setup.py install
Hope it works out for you!
I am currently having some problems installing tensor flow with gpu support.
This is the guide i've followed.
Install NVIDIA CUDA (preinstalled)
Install NVIDIA cuDNN (preinstalled)
Install bazel
wget https://github.com/bazelbuild/bazel/releases/download/0.4.3/bazel-0.4.3-installer-linux-x86_64.sh
chmod +x bazel-0.4.3-installer-linux-x86_64.sh
./bazel-0.4.3-installer-linux-x86_64.sh --user
install tensor flow from source
git clone https://github.com/tensorflow/tensorflow
cd tensorflow/
./configure
bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
the last one don't finish.. or it does.. it comes up with an error message
a#fe1:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
.
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.build/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
Server finished RPC without an explicit exit code
after this should i be able to do this
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tenso
rflow_pkg
according to the guide, but is not possible.
i've previously had tensor flow cpu version running, but since the need of gpu were sincerely pressing i decided to install it... but didn't think it would be this troublesome..
any idea on why it is not possible to build it?
os:centOS 7.1
gpu:nvidea
I've had problems attemping to install Tensorflow from source using Bazel as well.It could be that the current bazel build has problems,since that occured in the past with me.It would help if you provided us with information about your system(OS & GPU),but you're probably better off using pip(or pip3) and doing sudo pip(3) install tensorflow-gpu.