pip install not working -- Manjaro
#1
Hi, 

I recently switched my pinebook pro to Manjaro. Everything seems good so far. 

But I cannot install the scipy package via `pip`. After installing Blas and some cmake stuff I got it to install numpy via `pip install numpy` but scipy  still does not work. I know that there is a python-scipy package that I can get via pacman but I was wondering why `pip install scipy` does not work. 


At first it crashed because of memory issues, but I set up swap as described here and it worked. However it still will not work -- output below . What is `ld` and what is `collect2` and does anybody understand what is going on? 

Some of the output:
Code:
g++ -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/sparsetools.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/csr.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/csc.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/bsr.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/other.o -L/usr/lib -Lbuild/temp.linux-aarch64-3.8 -o build/lib.linux-aarch64-3.8/scipy/sparse/_sparsetools.cpython-38-aarch64-linux-gnu.so -Wl,--version-script=build/temp.linux-aarch64-3.8/link-version-scipy.sparse._sparsetools.map
 collect2: error: ld returned 1 exit status
 Running from scipy source directory.
 /tmp/pip-build-env-op9fysr1/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:690: UserWarning:
     Optimized (vendor) Blas libraries are not found.
     Falls back to netlib Blas library which has worse performance.
     A better performance should be easily gained by switching
     Blas library.
   self.calc_info()
 /tmp/pip-build-env-op9fysr1/overlay/lib/python3.8/site-packages/numpy/distutils/system_info.py:782: UserWarning: Specified path /usr/local/include/python3.8 is invalid.
   return self.get_paths(self.section, key)
 error: Command "g++ -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/sparsetools.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/csr.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/csc.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/bsr.o build/temp.linux-aarch64-3.8/scipy/sparse/sparsetools/other.o -L/usr/lib -Lbuild/temp.linux-aarch64-3.8 -o build/lib.linux-aarch64-3.8/scipy/sparse/_sparsetools.cpython-38-aarch64-linux-gnu.so -Wl,--version-script=build/temp.linux-aarch64-3.8/link-version-scipy.sparse._sparsetools.map" failed with exit status 1
 ----------------------------------------
 ERROR: Failed building wheel 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-mtu_9mu8/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mtu_9mu8/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-mtu_9mu8/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
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
A bit earlier I found this
Code:
 creating /tmp/tmpkgfz2rq5/tmp
 creating /tmp/tmpkgfz2rq5/tmp/tmpkgfz2rq5
 compile options: '-I/usr/local/include -I/usr/include -c'
 gcc: /tmp/tmpkgfz2rq5/source.c
 gcc -pthread /tmp/tmpkgfz2rq5/tmp/tmpkgfz2rq5/source.o -L/usr/lib -lblas -o /tmp/tmpkgfz2rq5/a.out
 /usr/bin/ld: /tmp/tmpkgfz2rq5/tmp/tmpkgfz2rq5/source.o: in function `main':
 /tmp/tmpkgfz2rq5/source.c:6: undefined reference to `cblas_ddot'
 /usr/bin/ld: /tmp/tmpkgfz2rq5/source.c:6: undefined reference to `cblas_ddot'
 collect2: error: ld returned 1 exit status
 gcc -pthread /tmp/tmpkgfz2rq5/tmp/tmpkgfz2rq5/source.o -L/usr/lib -lcblas -lblas -o /tmp/tmpkgfz2rq5/a.out
 customize UnixCCompiler

Update:
tried to import numpy and get the following error:
Code:
Original error was: /usr/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-aarch64-linux-gnu.so: undefined symbol: cblas_sgemm
#2
I'd recommend just installing the package via `pacman -Syu python-scipy` – running `pip` (or especially `sudo pip`) is not recommended on Arch-based systems.

If you really need to install it with pip, you'll need the dependencies and makedependencies from python-numpy, preferably with `openblas` instead of `cblas`.

If using `virtualenv`, you'll probably need to initialize it with `virtualenv --system-site-packages`.
#3
(03-02-2020, 04:49 AM)llsf Wrote: I'd recommend just installing the package via `pacman -Syu python-scipy` – running `pip` (or especially `sudo pip`) is not recommended on Arch-based systems.

If you really need to install it with pip, you'll need the dependencies and makedependencies from python-numpy, preferably with `openblas` instead of `cblas`.

If using `virtualenv`, you'll probably need to initialize it with `virtualenv --system-site-packages`.

thanks. I did go with the arch package for numpy but I did not know that `virtualenv --system-site-packages` existed. that sounds fairly useful.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Working suspend on Manjaro brzegorz 2 120 8 hours ago
Last Post: vssz
  Please help...Pinebook Pro Night Color / mode not working :( sushilsharma71@gmail.com 0 43 Yesterday, 10:40 PM
Last Post: sushilsharma71@gmail.com
  Manjaro and Arch repository with privacy oriented software as400 78 45,660 07-28-2021, 05:24 AM
Last Post: llsf
  how to install jmtpfs ? flatulent_piney 1 93 07-26-2021, 06:37 AM
Last Post: tophneal
  Manjaro [ARM Stable Update] 2021-07-23 issues Bocanila 0 110 07-24-2021, 09:09 AM
Last Post: Bocanila
  Sound stuttering on Manjaro gnome after latest kernel upgrade? pjsf 0 127 07-13-2021, 10:37 PM
Last Post: pjsf
  Kernel crash on Manjaro ARM mfashby 0 137 07-06-2021, 03:17 PM
Last Post: mfashby
  External USB C Monitor not working altacus 26 13,887 06-29-2021, 10:34 AM
Last Post: jkm
  Manjaro wont recognize eMMC after booting with it disabled peasant 1 236 06-27-2021, 02:39 AM
Last Post: Arwen
  Pinebook pro nearly unusable after using manjaro-arm-installer TheCounselor 0 281 06-18-2021, 03:34 PM
Last Post: TheCounselor

Forum Jump:


Users browsing this thread: 1 Guest(s)