Bottom Page

Thread Rating:
  • 4 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Numpy and matplotlib in incorporated Python.

I am trying to incorporate Python in my Lazarus (IDE using Free Pascal) application using python4delphi (PythonForDelphi) components. They support both Delphi and Lazarus. I can execute both standard commands and commands from standard imports (math, random, itertools). But I can't use numpy or matplotlib.

I have an error "AttributeError: module 'numpy' has no attribute 'array'' for numpy when I am trying to use a numpy.array and an error "ImportError: cannot import name 'rcParams'" when I am using "import matplotlib.pyplot as plt".

Both libraries are working fine when used from installed Python. When I print sys.path from Lazarus it shows ['PythonPath\\', 'PythonPath\\DLLs', 'PythonPath\\lib', 'ProgramPath', 'C:\\Users\\MyUser\\AppData\\Roaming\\Python\\Python36\\site-packages', 'PythonPath', 'PythonPath\\lib\\site-packages']. PythonPath is location where Python is installed, ProgramPath is location where Lazarus program is located.

Thanks in advance for your response.
You like this post

Top Page

Messages In This Thread
Numpy and matplotlib in incorporated Python. - by CSKir - Jan-10-2019, 08:31 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Spacing pie chart colours evenly in matplotlib? Giovanni_diJacopo 1 122 Jul-12-2019, 12:31 PM
Last Post: scidam
  Error installing numpy srm 3 182 Jul-08-2019, 06:26 PM
Last Post: srm
  AttributeError: module 'numpy' has no attribute 'array aapurdel 7 914 May-29-2019, 02:48 AM
Last Post: heiner55
  Array in numpy Truman 5 3,255 May-26-2019, 10:14 AM
Last Post: snippsat
  [split] Array in numpy aapurdel 1 156 May-25-2019, 08:05 PM
Last Post: buran
  [numpy]add a value to an array elmismo999 1 194 May-23-2019, 04:15 PM
Last Post: michalmonday
  Keras + Matplotlib causing crash spearced 2 324 May-17-2019, 09:47 AM
Last Post: spearced
  MatPlotLib 2d plot of current density? ruben 0 142 May-13-2019, 06:47 AM
Last Post: ruben
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 241 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  while creating a array using numpy.arrange, how to negate only the last 50 numbers? vicky53 1 246 Apr-06-2019, 11:52 AM
Last Post: scidam

Forum Jump:

Users browsing this thread: 1 Guest(s)