Python Forum
Install module without "pip"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install module without "pip"
#1
I need to use "openpyxl" module but I can't install it with "pip" (not available on the system). So far I downloaded and placed "openpyxl" in the same directory where I run my python script where I added this line:

from .openpyxl import Workbook

but when I run my python script I get error: "ValueError: Attempted relative import in non-package".

I tried different things but didn't come to a solution...any help?
Reply
#2
You can perhaps use the old way to install packages
  • download the source tree
  • open a terminal (or Cmd window or something similar)
  • change current directory to the package's directory containing the 'setup.py' file
  • run the command python setup.py install or perhaps python setup.py install --user
Reply
#3
install pip.
without pip you will go through nightmare every time you try to install packages.

You can install from source - run the setup.py directly, but you will need to install dependencies in advance.
So, again, use pip
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't install nor import delorean module Tek 3 2,798 Oct-27-2021, 03:32 AM
Last Post: Tek
  Unable to install module rrowhe4d 1 2,278 Oct-13-2020, 10:20 AM
Last Post: Larz60+
  trying to pip install stasm module getting error djf123 3 4,494 Jul-26-2020, 05:00 AM
Last Post: millpond
  Install thresding module kalvarix 2 2,182 May-04-2020, 03:25 PM
Last Post: kalvarix
  Install module with pip3 on a non root user matthewpintor2107 1 2,398 Apr-28-2020, 03:16 PM
Last Post: pyzyx3qwerty
  How do I install the dom.minidom module? Johno 3 7,094 Apr-17-2020, 09:46 PM
Last Post: Larz60+
  how to import a module which is installed to personal folder using pip install --pre? geekgeek 2 2,416 Mar-09-2020, 02:38 PM
Last Post: geekgeek
  Can a module be executed even if the computer running it does not install it? CFYB 5 3,404 Feb-08-2020, 01:56 PM
Last Post: snippsat
  Cannot pip install py-xml module kump 3 6,997 Jul-23-2019, 02:42 PM
Last Post: snippsat
  I get this when trying to install a module - SyntaxError: invalid syntax ? ejected 2 3,318 Mar-25-2019, 07:53 PM
Last Post: ejected

Forum Jump:

User Panel Messages

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