Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Installing a python package using pip
#1
Hi,

This is a continuation of a thread I posted last week .
I have a python package that is a wrapper around some c++ libs with a python interface.
this works absolutely perfectly when you add the location of the pyd to the path and import

I have created a pip install package using distutils.core setup functionality.

The package is created and the tarball is put in the Libs/site-packages location of my python directory.
I then run pip.exe install myPackage.tarball

Pip successfully installs the package . untarring all the files to the directory under libs/site-packages .

If i set my path to that particular directory and import the package into my python script then its all good and i can use the package perfectly.

However, if i open the python environment andjust import ther package.. the package imports perfectly , but i cannot access any of my functions (that i could do when the pyd is part of the path) .

I think it has someting to sdoc with the loader class used to actually install the package .

#this is the script without the pyd location as part of the path
importlib.find_loader('myPackage')

_frozen_importlib_external._NamespaceLoader object at 0x006B7D70>


however, if the package is successfully loaded in the same function call gives .

_frozen_importlib_external.ExtensionFileLoader object at 0x006B7CF0>

So is there a way i can tell pip to is the ExtensionFileLoader instead of the Namespace loader .


any advice here would be great .
thanks
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Help needed for a python package keysson 1 159 Sep-02-2020, 03:37 AM
Last Post: Larz60+
  Python package as installable Prabakaran141 0 273 Mar-10-2020, 10:07 AM
Last Post: Prabakaran141
  Installing a new package using pip in conda environment firebolt7 1 534 Nov-18-2019, 12:31 PM
Last Post: snippsat
  Help with understanding a python package pyhill00 4 771 Mar-21-2019, 12:42 AM
Last Post: Larz60+
  new python package test ramkrishna 0 465 Feb-25-2019, 12:18 PM
Last Post: ramkrishna
  pip not installing any package on windows royhimo855 0 1,235 Dec-10-2018, 07:58 AM
Last Post: royhimo855
  pip installing package using c++ boost in windows 6hearts 2 2,003 Feb-16-2018, 06:09 PM
Last Post: 6hearts
  upgrading python package amka 5 2,979 Nov-18-2017, 02:44 PM
Last Post: snippsat
  Problems installing Python - Failed to install MSI package Johnnyq70 1 2,376 Oct-29-2017, 08:50 PM
Last Post: Larz60+
  Problem installing urlparse4 package BobLoblaw 2 3,014 Oct-06-2017, 05:16 PM
Last Post: BobLoblaw

Forum Jump:


Users browsing this thread: 1 Guest(s)