Can't import win32crypt python module - windows

I have the 32 bit version of python 3.4 installed. I'm trying to use the win32crypt module after installing pywin32 but I get the following error message in git CLI:
import win32crypt
ImportError: DLL load failed: The specified module could not be found.
As recommendedhere, I used dependency walker on the win32crypt.pyd file (located at C://Python34/Libsite-packages/win32 on my computer) and several dll are missing: PYTHON34.dll, PYWINTYPES34.DLL, GPSVC.DLL, IESHIMS.DLL.
Are these missing dll likely to cause the import failure? If so, how can I fix this?

A more modern solution:
pip install pypiwin32
This contains .whl files to aid in installing on Windows.

You don't need to copy/paste any dll, simply add the pywin32 module to the windows environment variable Path. Default is: "C:\Python34\Lib\site-packages\pywin32_system32".
Please note that dependency walker still shows missing dll, so maybe it is of doubtful utility in some cases.

I try to use python x64, and it work.

another solution is that you can copy 2 dll files from "C:\Python34\Lib\site-packages\pywin32_system32" and paste them where ur .py file location is,and then use the command --add-data ".*.dll;." just make sure there're no more dll files but these two in this path. this is suitable when you are using '-F' command

Related

Installing Meson from pip results in missing meson.py

I am having a similar issue to this problem.
I want to download Meson for Windows and used the following command:
pip3 install meson
This installs in my site-packages folder, specifically c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages\mesonbuild
However, running meson or python3 meson.py results in an error:
'meson' is not recognized as an internal or external command, operable
program or batch file.
When looking at the mesonbuild directory within site-packages, I seem to be missing the meson or meson.py file. Has anybody ever come across this issue before?
After opening up Visual Studio, and looking at the installed Python packages in my environment, I noticed this interesting information window above the list of my Python packages:
Due to new security restrictions, installing from the internet may not
work on this version of Python.
After seeing this, I decided to install Meson through the website's MSI installer. Indeed, after trying to download the installer, Windows threw up all kinds of security warnings and "are you sure you want to do this" notifications before I convinced Windows that I really did want to install Meson.
I just wanted to share this with anybody that might have the same issues. The MSI installer worked for my needs.
Try the following :
python3 -m mesonbuild.mesonmain build
Meson pip package contains meson and mesonbuild modules. The meson module serves as Python entry point, which, during an initial execution of setup.py, associates mesonbuild.mesonmain:main with command line name 'meson'. (Explain Python entry points?). To invoke meson via python3 use python3 -m mesonbuild.mesonmain build, which writes build config into 'build' directory (provided that there is meson.build file in the current directory.) There is no such file 'meson.py' in mesonbuild module and meson module does not contain any Python code.

What is the difference of the package under `anaconda3/bin` and `anaconda3/lib/python3.7/`?

After I install the package transformer by pip install transformer, I find it under three locations.
/home/jinggu/anaconda3/bin/transformers
/home/jinggu/anaconda3/lib/python3.7/site-packages/transformers-2.1.1.dist-info/*
/home/jinggu/anaconda3/lib/python3.7/site-packages/transformers/*
What is the difference between these three?
The two in site-packages are for the metadata about the package (transformers-2.1.1.dist-info/) and the actual source code (transformers/). The file in the bin/ folder is called an entry point and represents a commandline interface provided by the package. In this case, you can see this defined in the setup.py file and that it points to running the main() function.
The anaconda3/bin folder contains executables installed w/ the package. If packages would like to provide a command line interface they will come with binaries to be executed from the command line. Not sure what transformers is, but if you navigate to anaconda3/bin/ you should be able to ./transformers -flags or cla's.
The python3.7/site-packages/ folders contain the python source code that can be imported to be used in your projects. This is generally how anaconda packages are used - and how you use the packaged libraries through conda's environment.
In your case, the transformers package came with binaries as well as the source code (to be imported for use in your projects).

Biopython, import error with "import Bio"

I have installed Biopython by Anaconda on Windows.
When I try import Bio I get this error:
ModuleNotFoundError: No module named 'Bio'
Why?
Simone.. it looks like your installation did go wrong somehow. Regardless of why and how try the following stepwise approach to see if your import error remains.
On Windows (the dots denote your installed program path specifics):
e.g. go to: C:\....\Anaconda...\Lib\site-packages
find and remove folders using delete.
folder 1: "\Bio"
folder 2: "\biopython-1.70.dist-info"
The version value 1.70 might be 1.69 when using conda for installation.
Empty your trashbin. This way the system can't do tricks and recover or link to deleted files and folders.
Install pip if its not and grab it from here.
try pip install biopython --no-cache-dir
Voila! Hope it works now for you too... Enjoy!
In case its not check windows environment variables\path.. via control panel>advanced system settings to include PATH to site-packages. Or do similar on other OS.

Package not listed in requirements warnings in PyCharm

PyCharm checks that every imported module (not in the standard lib) is in requirements.txt but for some modules (eg: grpcio vs grpc), the package name is different from the module name. Is there a way to silence the warnings in this case?
It's the bug in PyCharm, and it's still open: https://youtrack.jetbrains.com/issue/PY-11963
You can use #noinspection PyPackageRequirements to each import with this warning to suppress it.

Including date and time in Tex File

The latex file is giving the following error:
! LaTeX Error: File `datetime.sty' not found.
Here is the Latex code: \usepackage{datetime}
Am I missing something?
I am using Debian 3.1 Linux Machine.
I don't use Debian myself, but if I look it up, Debian contains it in the package 'texlive-latex-extra'. If you installed LaTeX via the packet-manager of debian (I think so) the command 'apt-get install texlive-latex-extra' executed as root should install you the needed file. Alternatively you can use a graphical package-manager to install the package.
If your LaTeX Distribution does not load the package automatically, you can try to install it manually according to the readme file here: http://www.ctan.org/pub/tex-archive/macros/latex/contrib/datetime/ Edit: http://www.ctan.org/pkg/datetime
Yes, you are missing the datetime.sty file; you are probably missing the whole package too. What system are you using for managing your (La)TeX installation ? If you tell us you may get more specific advice than I can give.
You need to get the datetime package from CTAN or one of its mirrors and install it into your local texmf tree. Your LaTeX manager will do this for you. You may also be able to configure your LaTeX manager to automatically download and install packages the first time they are requested.

Resources