Re: [Distutils] Python package inquiry
Can you tell us which instructions you followed and what the exact output of that command is? Also, what version of Python are you using (python -V)? On Aug 9, 2016 6:40 PM, "Meradj Aghdam" wrote: > To whom it may concern, > > Hi, > > I am new to Python and I am struggling to install Python packages. I have > followed the instructions however it does not seem to be working. I am > trying to install the package through the Python(Command Line), the package > is economics, and when I put > > python -m pip install Economics > > It does not work and the error that it is a syntax error. I am using > Python 2.7. Would you mind kindly let me know how I can install packages? > > Your help if very much appreciated, > > Kind regards, > > Meradj > > ___ > Distutils-SIG maillist - Distutils-SIG@python.org > https://mail.python.org/mailman/listinfo/distutils-sig > > ___ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Python package inquiry
Hi Meradj, Are you in the Python interpreter when you type that? If so, that's your problem. You need to be at your normal command prompt. Open a new shell or terminal and type that command first. If you've already started Python and are in the interpreter, that would indeed, give you a syntax error. On Tue, Aug 9, 2016 at 7:56 AM, Meradj Aghdam wrote: > To whom it may concern, > > Hi, > > I am new to Python and I am struggling to install Python packages. I have > followed the instructions however it does not seem to be working. I am > trying to install the package through the Python(Command Line), the package > is economics, and when I put > > python -m pip install Economics > > It does not work and the error that it is a syntax error. I am using > Python 2.7. Would you mind kindly let me know how I can install packages? > > Your help if very much appreciated, > > Kind regards, > > Meradj > > ___ > Distutils-SIG maillist - Distutils-SIG@python.org > https://mail.python.org/mailman/listinfo/distutils-sig > > -- cordially, Anna ___ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] msvc9compiler.py - vcvarsall.bat is living one folder higher - VS90COMNTOOLS
On 09Aug2016 1519, Dr. Andreas Krueger wrote: I could not find a github repo, otherwise I would have filed this as an "issue" there. The subfolder "VC" is wrong in msvc9compiler.py - at least on my system (win7-64bit, py2.7.12, anaconda 2.4.1, conda 4.1.11) So in your "msvc9compiler.py" instead of productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC") it needs to be productdir = os.path.join(toolsdir, os.pardir, os.pardir) Why do I say that? When googling the error message: "DistutilsPlatformError: Unable to find vcvarsall.bat", it is recommended "everywhere" on the web, to download "VCForPython27.msi", Microsoft Visual C++ Compiler for Python 2.7 http://aka.ms/vcpython27 BUT then vcvarsall.bat ends up being in "C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" and NOT in "C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\vcvarsall.bat" where YOUR code is expecting it. Perhaps you actually want to check BOTH places, to keep compatibility with some older versions / different setups? Because I suppose, your code had worked, at some stage in the past. Thanks a lot! Andreas There's actually also a requirement for a relatively recent version (>=6.0) of setuptools in order to build correctly using the Visual C++ Compiler for Python. This will allow the compiler to be found without using the environment variable. I suggest ensuring that setuptools is up to date, and either import it in the setup.py (you don't have to do anything except import it) or use pip to install your packages. Cheers, Steve ___ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] Python package inquiry
To whom it may concern, Hi, I am new to Python and I am struggling to install Python packages. I have followed the instructions however it does not seem to be working. I am trying to install the package through the Python(Command Line), the package is economics, and when I put python -m pip install Economics It does not work and the error that it is a syntax error. I am using Python 2.7. Would you mind kindly let me know how I can install packages? Your help if very much appreciated, Kind regards, Meradj ___ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] msvc9compiler.py - vcvarsall.bat is living one folder higher - VS90COMNTOOLS
I could not find a github repo, otherwise I would have filed this as an "issue" there. The subfolder "VC" is wrong in msvc9compiler.py - at least on my system (win7-64bit, py2.7.12, anaconda 2.4.1, conda 4.1.11) So in your "msvc9compiler.py" instead of productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC") it needs to be productdir = os.path.join(toolsdir, os.pardir, os.pardir) Why do I say that? When googling the error message: "DistutilsPlatformError: Unable to find vcvarsall.bat", it is recommended "everywhere" on the web, to download "VCForPython27.msi", Microsoft Visual C++ Compiler for Python 2.7 http://aka.ms/vcpython27 BUT then vcvarsall.bat ends up being in "C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" and NOT in "C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\vcvarsall.bat" where YOUR code is expecting it. Perhaps you actually want to check BOTH places, to keep compatibility with some older versions / different setups? Because I suppose, your code had worked, at some stage in the past. Thanks a lot! Andreas P.S.: I had put some debugging prints to understand your code better, and this is what it outputs: toolsdir= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\Bin\ productdir= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\Bin\..\..\VC productdir= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC vcvarsall= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\vcvarsall.bat and that last path is wrong. I could repair it, but only by patching your "msvc9compiler.py": productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC")--> productdir = os.path.join(toolsdir, os.pardir, os.pardir) now it does find it: toolsdir= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\Bin\ productdir= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\WinSDK\Bin\..\.. productdir= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0 vcvarsall= C:\Users\Andreas\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat ___ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] setuptools 25.1.6 broke numpy.distutils on Windows
On 09Aug2016 0213, Antoine Pitrou wrote: Just a heads-up that latest setuptools is incompatible with numpy.distutils on Windows: https://github.com/pypa/setuptools/issues/728 For those who don't want to dig into the issues and pull requests, it seems that multiple libraries were patching different parts of distutils and adding extra quotes to the command line. This was apparently only occurring with Python 3.5. The main reason I want to add to this post is that *Python 3.5 is still taking bugfixes*. If there is a problem in distutils, please report it to bugs.python.org first so we can fix it, and then look into monkeypatching the older versions. Cheers, Steve ___ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] setuptools 25.1.6 broke numpy.distutils on Windows
Hello, Just a heads-up that latest setuptools is incompatible with numpy.distutils on Windows: https://github.com/pypa/setuptools/issues/728 The whole scientific community will suffer until this issue is solved one way or the other (either on the setuptools side, or on the Numpy side, or both). Regards Antoine. ___ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig