python-install

ImportError: No module named argparse

放肆的年华 提交于 2020-01-01 07:29:10
问题 I am trying to run a Python program but get the error ImportError: No module named argparse I found the question “argparse Python modules in cli” here on StackOverflow and tried the first comment, i.e. running the command python -c "import argparse; print argparse" which resulted in <module 'argparse' from '/usr/lib/python2.7/argparse.pyc'> For me it seems like there is Python 2.7 installed on the machine (of which I am not administrator) and the argparse module is present as well. So I

Adding into Path var while silent installation of Python - possible bug?

怎甘沉沦 提交于 2019-12-23 12:44:03
问题 I need to passively install Python in my applications package installation so i use the following: python-3.5.4-amd64.exe /passive PrependPath=1 according this: 3.1.4. Installing Without UI I use the PrependPath parameter which should add paths into Path in Windows environment variables. But it seems not to work. The variables does not take any changes. If i start installation manually and select or deselect checkbox with add into Paths then everything works. Works same with clear

Numpy backwards compatibility: Visual C++ 9 not found

大憨熊 提交于 2019-12-20 04:41:10
问题 I downloaded numpy-1.10.1 from sourceforge and I have Python 2.7. I extracted, renamed and entered the numpy directory under site-packages. I ran the python setup.py install command, and got this error message. I have Microsoft Visual C++ 2013 Redistributable, and it's asking for version 9. C:\Python27\Lib\site-packages\numpy $ python setup.py install [lots of text] error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat) Get it from http://aka.ms/vcpython27 Why isn't it

How to install Python using Windows Command Prompt

橙三吉。 提交于 2019-12-19 09:19:56
问题 Is it possible to install Python from cmd on Windows? If so, how to do it? 回答1: https://docs.python.org/3.6/using/windows.html#installing-without-ui Installing Without UI: All of the options available in the installer UI can also be specified from the command line, allowing scripted installers to replicate an installation on many machines without user interaction. These options may also be set without suppressing the UI in order to change some of the defaults. To completely hide the installer

Python setuptools/distutils custom build for the `extra` package with Makefile

放肆的年华 提交于 2019-12-18 11:45:34
问题 Preamble: Python setuptools are used for the package distribution. I have a Python package (let us call it my_package ), that has several extra_require packages to it. Everything works just find (installation and build of the package, as well as extras, if were requested), as all extra_require were python packages themselves and pip correctly resolved everything. A simple pip install my_package worked like a charm. Setup: Now, for one of the extras (let us call it extra1 ) I need to call a

Why wouldn't I want to add Python.exe to my System Path at install time?

倾然丶 夕夏残阳落幕 提交于 2019-12-10 13:23:29
问题 I'm reinstalling Python, on Windows 7, and one of the first dialog boxes is the Customize Python screen. The default setting for "Add Python.exe to Path" is "Entire feature will be unavailable." I always change this to "Will be installed on local hard drive." It's not an issue, changing the system environment variables is a snap, but is there any upside to leaving this un-ticked? 回答1: If you only have one version of Python installed, it won't matter. If you have multiple versions installed,

Numpy backwards compatibility: Visual C++ 9 not found

安稳与你 提交于 2019-12-02 07:22:34
I downloaded numpy-1.10.1 from sourceforge and I have Python 2.7. I extracted, renamed and entered the numpy directory under site-packages. I ran the python setup.py install command, and got this error message . I have Microsoft Visual C++ 2013 Redistributable, and it's asking for version 9. C:\Python27\Lib\site-packages\numpy $ python setup.py install [lots of text] error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat) Get it from http://aka.ms/vcpython27 Why isn't it backward compatible? Python 2.7 uses Visual Studio 9, which came out in 2008. When you're building Python

How to install Python using Windows Command Prompt

一个人想着一个人 提交于 2019-12-01 08:43:16
Is it possible to install Python from cmd on Windows? If so, how to do it? https://docs.python.org/3.6/using/windows.html#installing-without-ui Installing Without UI: All of the options available in the installer UI can also be specified from the command line, allowing scripted installers to replicate an installation on many machines without user interaction. These options may also be set without suppressing the UI in order to change some of the defaults. To completely hide the installer UI and install Python silently, pass the /quiet option. To skip past the user interaction but still display

python installing package with submodules

一世执手 提交于 2019-12-01 08:37:41
I have a custom project package with structure like: package-dir/ mypackage/ __init__.py submodule1/ __init__.py testmodule.py main.py requirements.txt setup.py using cd package-dir followed by $pip install -e . or pip install . as suggested by python-packaging as long as I access the package from package-dir For example : $cd project-dir $pip install . at this point this works: $python -c 'import mypackage; import submodule1' but This does not work $ cd some-other-dir $ python -c 'import mypackage; import submodule1' Traceback (most recent call last): File "<stdin>", line 1, in <module>

python installing package with submodules

北战南征 提交于 2019-12-01 03:52:49
问题 I have a custom project package with structure like: package-dir/ mypackage/ __init__.py submodule1/ __init__.py testmodule.py main.py requirements.txt setup.py using cd package-dir followed by $pip install -e . or pip install . as suggested by python-packaging as long as I access the package from package-dir For example : $cd project-dir $pip install . at this point this works: $python -c 'import mypackage; import submodule1' but This does not work $ cd some-other-dir $ python -c 'import