V
V
Vadim2021-05-04 23:00:13
Python
Vadim, 2021-05-04 23:00:13

Pipenv how to install package in local directory?

Hello everyone,

there is a python file mypython.py with simple content

import miniupnpc
u = miniupnpc.UPnP()
u.discoverdelay = 200
u.discover()
u.selectigd()
print('external ip address: {}'.format(u.externalipaddress()))


I run Virtual Env-t, pipenv shell

then pipenv install miniupnpc .... and everything works.

But how do I get miniupnpc to install in the same directory as mypython.py and can just import without any virtual environment so that when

$python3 mypython.py runs
Traceback (most recent call last):
File "lambda_function.py", line 1 , in
import miniupnpc
ModuleNotFoundError: No module named 'miniupnpc'

--- it did not display an error

Good luck,
Vadim

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question