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
  Manjaro Sway Theme Broken Eighty8 1 162 03-08-2024, 08:41 AM
Last Post: tophneal
  Attempting to install Void Linux, boots into a black screen 9a3eedi 0 203 02-18-2024, 08:54 AM
Last Post: 9a3eedi
Question Manjaro with Full Disk Encryption and GRUB dumetrulo 1 1,603 02-02-2024, 02:45 AM
Last Post: frankkinney
  Manjaro network problem late 2023 acruhl 1 210 01-19-2024, 11:32 PM
Last Post: Kevin Kofler
  Help installing Manjaro on eMMC of Pinebook Pro pine4546464 4 1,910 12-13-2023, 07:22 PM
Last Post: trillobite
  Need Help Recovering Manjaro /boot Contents on Pinebook Pro calinb 6 1,978 12-11-2023, 03:47 AM
Last Post: calinb
  Manjaro 20.04 not loading from SD (with Manjaro on eMMC) zaius 1 290 12-07-2023, 03:11 PM
Last Post: wdt
  install debian on pbp jsch 7 3,826 11-22-2023, 04:22 PM
Last Post: TRS-80
  Manjaro ARM: enabling external monitors & fixing Broadcom WiFi after updating trifleneurotic 2 745 11-14-2023, 10:57 AM
Last Post: trifleneurotic
  USB 3 port not working with Armbian zaius 3 717 11-13-2023, 01:54 PM
Last Post: zaius

Forum Jump:


Users browsing this thread: 1 Guest(s)