Hi I've been trying to install python and all of my depedencies with "offline mode".
i've downloaded manually from the machine that has internet.
I installed python v3.10
Now I'm trying to install pip-22.2.2, but i got an error that says :
ModuleNotFoundError :No module named 'setuptools'
My command is :
python setup.py install
My directory is :
Python : .../.../Python/Python310
Pip : .../.../Python/Python310/pip-22.2.2
I'm on windows 10
If you are getting an error that says "No module named 'setuptools'", it means that you are missing the setuptools module, which is required for the installation of pip. You can download the setuptools module from https://pypi.org/project/setuptools/#files. After downloading, you can install the module by running the command python setup.py install
Related
I have installed the psycopg2 with this command in my package folder :
pip install --target ./package psycopg2 # Or
pip install -t ./package psycopg2
now psycopg2 module is in my package and I have created the zip and upload it in AWS lambda.
In my local sprint is working fine but on AWS lambda it was not working.
It shows me error
{
"errorMessage": "Unable to import module 'lambda_function': No module named 'psycopg2._psycopg'",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []
}
my lambda code is
import psycopg2
def lambda_handler():
print('hello')
my all other modules are working fine
I faced the same issue as I created the virtual env for layers on Mac. to solve this, I used the below command.
pip install --platform=manylinux1_x86_64 --only-binary=:all:
psycopg2-binary --target "your lambda layer path"
in my case it was:
lambda/layer/python/lib/python3.8/site-packages
You can also use --upgrade if some of the required libs are already there.
add this lib
pip install aws-psycopg2
In my case, I had to add psycopg2-binary to the requirements.txt
I'm using the "import ldap" in a python code. This is on a windows 10 machine.
I installed the python-ldap module
pip3 install python-ldap
Installed the dependencies based on the instructions at Python Can't install packages
Also resolved all the pip deployment issues based on Installing python-ldap in a virtualenv on Windows
I'm now getting the following error when executing the import ldap statement. am I missing something here? Any ideas to resolve it?
thon39\site-packages\ldap\__init__.py", line 34, in <module>
import _ldap
ImportError: DLL load failed while importing _ldap: The specified module could not be found.
Visit the unofficial Python binaries page:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap
Download the appropriate WHL package for your system.
For example, if you're using Python 3.8 on an x64 system, download python_ldap‑3.3.1‑cp38‑cp38‑win_amd64.whl
(hint: do NOT download the +sasl version unless you have the Cyrus SASL code running on your system...)
Start the VirtualEnv for your project, if you're using one (C:\Users\youruser\.virtualenv\YourVirtualEnv\Scripts\activate.bat) -- if you're not, skip this step.
Then run pip3 install C:\Path\To\python_ldap_x.x.x-cpXX-cpXX-winXX.whl and this should install the Python DLL (pyd) file for you.
I'm trying to perform a sensitivity analysis using the SALib module in Python(Spyder) and I installed it using "pip install SALib" in cmd prompt. The install was performed successfully however python says "No module named SALib" when I run the command "import SALib".
What am I doing wrong?
I have started getting this error for a "plspm" module in python which is part of R library after I 'conda install plspm' on my windows 10 OS. Installation has been done properly but i could not able to import plspm in python getting "No module" error. Please anyone help me to resolve.Thanks.
version of r-plspm is -0.4.9
needed packages already installed(scipy,skit-learn,pandas,numpy,statsmodule).
command used to install:
conda install -c conda-forge r-plspm
Screen shot of installed plspm:
Error:
I receive the error "No module named _bsddb".
I installed berkeley-db4 using Brew.
I load up the virtualenv and use "pip install bsddb3 --install-option="--berkeley-db='/usr/local/opt/berkeley-db4'" but I can't get passed this in any way I can think of:
Collecting bsddb3
Using cached bsddb3-6.1.1.tar.gz
Complete output from command python setup.py egg_info:
Can't find a local Berkeley DB installation.
(suggestion: try the --berkeley-db=/path/to/bsddb option)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/g6/j96dym1x0jx9ydrdkfs4dhnr0000gn/T/pip-build-676fDz/bsddb3
This is probably OS X only, because the shipped Python has something broken regarding berkeley-db and/or bsddb.
The solution:
Install brew and use brew to install python
After this 'which python' should pount to '/usr/local/bin/python'
Create a new virtualenv using Terminal OUTSIDE OF PYCHARM
In Pycharm's Project Interpreter settings choose 'Add Local'
Select the python bin inside your virtualenv directory