0

I've copied some site-packages to my projects subfolder. I want to force python to import numpy from project directory with:

from project_packages import numpy as np

Unfortunately during compilation i get error that refers to main site-packages path:

C:\Users\user\AppData\Local\Programs\Python\Python37\Lib\site-packages\numpy

I'm deploying this program for multiple location within company. Unfortunately in some locations there is different Windows environment. They have one virtual machine with software installed that has multiple users that use the same software. They have already some old Anaconda with old packages installed and their versions do not match with site-packages versions used in my project. IT says it needs to stay as it is. My code is stored on sharepoint and launched from excel file. I thought i could include (Copy>Paste) required site-packages within project folder. I've managed to do so with pandas and i have no errors. Unfortunately I get error with numpy. What should I do to make numpy work from project's folder.

It doesn't seem to be the cleanest solution but we are not allowed to distribute any executable or code files within company. Code needs to stay on sharepoint.

Best solution is where the only requirement for the user was to have python 3 installed and the rest of the code could be launched from sharepoint.

I believe my main mistake is copying numpy from site-packages to project folder with it's dependencies to old location? I don't know hot to move these packages differently. When using:

pip install numpy==1.15.1 my/project/path

i get: * directory is not installable

error code below:

data type not understood
  File "C:\Users\MM\Desktop\Python\test\p\numpy\core\arrayprint.py", line 1336, in dtype_is_implied
    dtype = np.dtype(dtype)
  File "C:\Users\MM\Desktop\Python\test\p\numpy\core\arrayprint.py", line 1421, in array_repr
    skipdtype = dtype_is_implied(arr.dtype) and arr.size > 0
  File "C:\Users\MM\Desktop\Python\test\p\numpy\core\getlimits.py", line 81, in __init__
    self.precision = int(-log10(self.eps))
  File "C:\Users\MM\Desktop\Python\test\p\numpy\core\getlimits.py", line 125, in <module>
    tiny=_f16(2 ** -14))
  File "C:\Users\MM\Desktop\Python\test\p\numpy\core\__init__.py", line 51, in <module>
    from . import getlimits
  File "C:\Users\MM\Desktop\Python\test\p\numpy\__init__.py", line 152, in <module>
    from . import core
  File "C:\Users\MM\Desktop\Python\test\test.py", line 1, in <module>
    from p import numpy as pd```
mPayne
  • 23
  • 4
  • 1
    Welcome to Stack Overflow. Please include a snippet of your code. This will help get assistance from others. – MoMo Jun 12 '19 at 21:01
  • Hello, could you also specify the error you get ? – Christian Jun 13 '19 at 12:34
  • Error added to edit. Depeneding on machine and numpy version i get different errors and all occur during import. Code does not start. – mPayne Jun 13 '19 at 12:58

0 Answers0