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
  Yubikey 5C on manjaro zeb11 0 10 1 hour ago
Last Post: zeb11
  red/green power led not working with kernel 5.14 alchemist 3 132 09-20-2021, 01:01 AM
Last Post: alchemist
  Manjaro - Internet connection sharing requires dnsmasq (but the dep isn't declared) Dendrocalamus64 0 117 09-11-2021, 05:25 PM
Last Post: Dendrocalamus64
  Pinebook pro nearly unusable after using manjaro-arm-installer TheCounselor 2 741 09-07-2021, 08:34 PM
Last Post: TRS-80
  WORKING Moonlight with FFMpeg on 5.10.11 ShootTheMoon2 1 531 08-20-2021, 06:40 PM
Last Post: xmixahlx
  Please help...Pinebook Pro Night Color / mode not working :( sushilsharma71@gmail.com 13 1,244 08-16-2021, 05:16 PM
Last Post: sushilsharma71@gmail.com
  External USB C Monitor not working altacus 29 15,853 08-08-2021, 10:19 AM
Last Post: Dendrocalamus64
  how to install jmtpfs ? flatulent_piney 5 500 08-04-2021, 07:19 AM
Last Post: tophneal
  Working suspend on Manjaro brzegorz 2 532 07-30-2021, 06:21 AM
Last Post: vssz
  Manjaro and Arch repository with privacy oriented software as400 78 48,392 07-28-2021, 05:24 AM
Last Post: llsf

Forum Jump:


Users browsing this thread: 1 Guest(s)