This question already has answers here:
error: Unable to find vcvarsall.bat
(42 answers)
Closed 8 years ago.
I want to install the PySqlite2 module in my python library. I opened command prompt and went to the download directory. This contains the Pysqlite-2.6.3 package extracted. I entered python setup.py install. It starts copying all the files untill it gives: Errror: Unable to find vcvarsall.bat. I can't seem to figure to out. My systems runs a 32bit version of windows 7.
While running setup.py for package installations Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.
Find more here.
Related
This question already has answers here:
error: Unable to find vcvarsall.bat
(42 answers)
Closed 8 years ago.
I'm brushing up on my Python and have recently installed ver. 2.7.9 on my Win7 64-bit PC. I tried installing a couple of packages (numpy 1.9.1 and scipy 0.15.1) but I get errors through the process. I ran:
> python setup.py install
from the folder of each package and although the setup script ran, neither of the packages got installed. I got the following errors:
numpy: Unable to find vsvarsall.bat
scipy: No module named numpy.distutils.core (???)
Note that I haven't tampered with the packages files at all, which I extracted from the .tar files available in the Python Package Index database. I'd appreciate any help on this matter.
The go-to repository for Windows modules is Christoph Gohlke's Python Extension Packages for Windows site. He has both numpy and scipy available. To install, download the appropriate .whl file, then run
pip install name_of_file.whl
to install the module. pip should have been installed automatically when you installed 2.7.9, if the command is not found, make sure you add C:\Python27\Scripts to your PATH and restart the command prompt.
This question already has answers here:
How do I use installed packages in PyCharm?
(14 answers)
Why isn't PyCharm's autocomplete working for libraries I install?
(2 answers)
Closed 4 years ago.
I received this message: "No module named M2Crypto"
I have already install M2Crypto with the command "pip install M2Crypto" and when I re-run it, I got the message: "Requirement already satisfied"
What's the problem with M2Crypto?
Thanks
ps:
I use Linux: 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 i686 i686 GNU/Linux, Pycharm and Python2.7 (/usr/bin/python2.7)
Maybe some interpreter option in PyCharm configuration for running the project?
First of all, verify that the version of pip is in line with your interpreter.
So for python2.7,
pip --version
should print something like
pip 6.0.8 from /usr/local/lib/python2.7/dist-packages (python 2.7)
depending on how you've installed it. The important part is in the end, where your interpreter ("python 2.7") should be shown.
Once you're sure to have the right pip-version, ensure your package is correctly installed. It should usually be installed in the directory printed out previously by pip (e.g. /usr/local/lib/python2.7/dist-packages/).
Assume you've already done this, what else can go wrong to make your interpreter not finding the 'M2Crypto' package?
python uses the PYTHONPATH environment variable for module lookups. So, there's the possibility, that your PYTHONPATH variable has been changed. Try running your program by adding the above-mentioned path to PYTHONPATH and either exporting it before running your webserver:
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH
# run your server here
or by prepending the same variable to your command:
PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH python <run-stuff-here>
This should make your program find the M2Crypto module.
This question already has answers here:
Python-magic installation error - ImportError: failed to find libmagic
(5 answers)
Closed 8 years ago.
I've downloaded and installed python-magic using "pip install python-magic".
Source: https://github.com/ahupp/python-magic
It downloaded and installed perfectly fine. I've also copied the 3 files (cygmagic-1.dll, cygwin1.dll, and cygz.dll) from cygwin installation into C:\Windows\System32.
Then, I also downloaded magic1.dll and placed it in System32 folder too.
But the command prompt is still giving me this error:
ImportError: failed to find libmagic. Check your installation
Why is this so?
EDIT: I've included C:\cygwin\bin into PATH also.
Make sure you also included
C:\cygwin\bin
in your system path. That seems to be the step missing.
Oh I just have to restart the computer for it to work. But ultimately, I still have problems using python-magic because of the "32bit" and "64bit" incompatibility bug. I guess I'll just check the file type by checking the extensions. Oh well.
This question already has answers here:
error: Unable to find vcvarsall.bat
(42 answers)
Closed 8 years ago.
I downloaded the cosmolopy Python library and tried to install it in every possible way...
Finally, I saved Cosmolopy as c:\python27\Lib\cosmolopy\...
1 Then run the setup file which gives me error
2 Run the following command form command prompt
python setup.py build
python setup.py install
BUT AGAIN GIVES ME ERROR: Unable to find vcvarsall.bat
PLEASE HELP ME OUT IT'S TALKING A LOT OF TIME IN INSTALLING MODULE
You could just put it in the same folder as your project.
EG:
Some_Directory\
python_file.py
The_module.py
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Installing modules in Python on Windows
The instructions in the documentation aren't helping. How do I install a module in Python?
If there is setup.py source file in module directory, run windows command line utility, change current directory to module directory and write
python setup.py install
make sure that python bin directory is in your system path variable
The same as everywhere, use easy_install. (Still it is somewhat more difficult to use under Windows because the cmd shell is far less powerful than bash)
You could try using pip