Python Forum
Including modules in Python using sys.path.append
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Including modules in Python using sys.path.append
#1
Hi all

I was hoping for some advice.

My company has python version 3.5 IDLE.

My company is NOT a software company, i have started using it to automate some of my tasks.

The issue is that modules such as pandas or numpy is not installed and these modules will never be installed (no specific reason was given).

However i have discovered that .py files that are not installed or party of the standard library can be included using the following code:-
import sys
sys.path.append("C:\Users\Joe\Test")
Test is a folder that contains various .py files.

I have pandas installed on my personal computer so I wanted to copy the pandas.py file from my personal computer into my work computer and put it in the Test folder shown above but i cannot seem to find pandas.py or numpy.py

My work computer is heavily restricted, i cannot access the c drive hence why i am trying to find an alternative method.

Any ideas?

Thank you.

I saw youtube video https://www.youtube.com/watch?v=CqvZ3vGoGs0&t=638s
Reply


Messages In This Thread
Including modules in Python using sys.path.append - by JoeDainton123 - Aug-23-2020, 08:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Building a DoublyLinkedList in Python - - append method Drone4four 2 414 Jan-08-2024, 01:27 PM
Last Post: Drone4four
  Function to count words in a list up to and including Sam Oldman45 15 6,541 Sep-08-2023, 01:10 PM
Last Post: Pedroski55
  How to see the date of installation of python modules. newbieAuggie2019 4 1,572 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  python move specific files from source to destination including duplicates mg24 3 1,095 Jan-21-2023, 04:21 AM
Last Post: deanhystad
  How to modify python script to append data on file using sql server 2019? ahmedbarbary 1 1,214 Aug-03-2022, 06:03 AM
Last Post: Pedroski55
  Python modules for accessing the configuration of relevant paths Imago 1 1,365 May-07-2022, 07:28 PM
Last Post: Larz60+
  Including data files in a package ChrisOfBristol 4 2,537 Oct-27-2021, 04:14 PM
Last Post: ChrisOfBristol
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,199 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  Not including a constructor __init__ in the class definition... bytecrunch 3 11,807 Sep-02-2021, 04:40 AM
Last Post: deanhystad
  Python modules to extract data from a graph? bigmit37 5 22,380 Apr-09-2021, 02:15 PM
Last Post: TysonL

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020