I am using python 3.3.0 .. Within this package C:\Python34\Scripts is my pip and I have added this path to my system and user environment variable PATH the link to this pip folder,I have installed Visual C++ 2010 but i don't know what needs to be done once it is installed if or not i need to configure something, yet when I do :
C:\Python33\Scripts>pip install https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip
It gives me the following error:
This is what stackoverflow editor has changed it to :
Fatal error in launcher: Unable to create process using
'"C:\Python33\python.exe " "C:\Python33\Scripts\pip.exe" install
https://pyodbc.googlecode.com/files/pyo dbc-3.0.7.zip'
C:\Python33\Scripts>pip
Fatal error in launcher: Unable to create process using
'"C:\Python33\python.exe " "C:\Python33\Scripts\pip.exe" '
And this is the actual error that i see at console:
ValueError: ['path']
----------------------------------------
Command "C:\Python33\python.EXE -c "import setuptools, tokenize;__file__='c
\users\elyon\appdata\local\temp\pip-inh3nq-build\setup.py';exec(compi
e(getattr(tokenize, 'open', open)(file).read().replace('\r\n',
'\n'), __fil
__, 'exec'))" install --record c:\users\elyon\appdata\local\temp\pip-x45j1j-
ecord\install-record.txt --single-version-externally-managed
--compile" failed ith error code 1 in c:\users\elyon\appdata\local\temp\pip-inh3nq-build
Since you're on Windows with Python 3.3, the easiest way to install pyodbc is to use the provided installers.
You should then be able to manage future upgrades using pip if you so desire.
C:\Python33\Scripts> .\pip.exe install --upgrade --allow-external pyodbc --allow-unverified pyodbc pyodbc
Requirement already up-to-date: pyodbc in c:\python33\lib\site-packages
Related
I use this command for installing MySQL client:
pip install mysqlclient
And then I see this problem:
running build_ext
building '_mysql' extension
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279
Cleaning up... Command C:\Python34\python.exe -c "import setuptools,
tokenize;file='C:\Users\Jayed\AppData\Local\Temp\pip_build_Jayed\mysqlclient\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
C:\Users\Jayed\AppData\Local\Temp\pip-l4c6dhkk-record\install-record.txt
--single-version-externally-managed --compile failed with error code 1 in C:\Users\Jayed\AppData\Local\Temp\pip_build_Jayed\mysqlclient
Storing debug log for failure in C:\Users\Jayed\pip\pip.log
Actually I went down this path. While I suppose you can find all the libraries and components you need to get the client to compile, it is telling you it can't find a compiled copy of the client and is trying to compile it to install it.
Follow the instructions here: https://pypi.org/project/mysqlclient/ (it has notes about windows doing what you are describing) or download the wheel file (from downloads link on the page) and type
pip install mysqlclient.whl
and it will install without demanding C++ in order to use mysql with python.
I am new to the Wagtail cms and am taking over a friend's project for his site.
I have downloaded his repo and am trying to get it to run locally. I have followed the steps on the wagtail documentation http://docs.wagtail.io/en/v1.12.1/getting_started/index.html
but in the site's requirements.txt file, there are some dependencies that just are not installing and giving errors:
here is the output of when trying to install the requirements:
build\lib.win32-2.7\psycopg2\_psycopg.pyd : fatal error LNK1120: 62 unresolved externals
error: command 'C:\\Users\\Adam\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\link.exe' failed with exit status 1120
Rolling back uninstall of psycopg2
Command "c:\python27\python.exe -u -c "import setuptools,
tokenize;__file__='c:\\users\\Adam\\appdata\\local\\temp\\pip-build-
bykm5e\\psycopg2\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record c:\users\Adam\appdata\local\temp\pip-
cidizd-record\install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in c:\users\Adam\appdata\local\temp\pip-
build-bykm5e\psycopg2\
(The full output is here: https://pastebin.com/m1ukkei8)
Any help would be greatly appreciated - I am using Python 2.7 and have tried reinstalling psycopg and have installed postresql
Your windows linker is throwing out errors as you don't have c++ libraries for an extension to be built properly.
I would suggest to you to rather install it through wheel file
by running
pip install some-package.whl
I'm not sure if this is the answer, but the version of psycopg2 that you're using had a bug that prevented installation using pip, due to some bug in pip. Try version 2.5.3 and see if that fixes it.
I'm trying to install my own Python package into a Python2.7 virtual environment on Windows, but I get
Installed c:\users\niklas\repos\ppy\engine
Error: no such option: --no-deps
----------------------------------------
Command "c:\users\niklas\repos\ppy\engine\.env2\scripts\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\niklas\\repos\\ppy\\engine\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 2 in C:\Users\niklas\repos\ppy\engine\
This does not happen when I do a normal installation (no -e flag). I've been checking the Pip and setuptools release notes, but it says nowhere the that a --no-deps option was removed.
I also added a print to my setup.py before setup() is called to print sys.argv which gives me
['-c', 'develop', '--no-deps']
so it must be setup() that is complaining. I also don't get this error when installing into a Python 3.5 virtual environment.
pip 9.0.1 from c:\users\niklas\repos\ppy\engine.env2\lib\site-packages (python 2.7)
setuptools 34.3.1
Edit: As it turns out, the normal installation also doesn't work but then it's the --record flag that is not recognized.
Installing node.py-script.py script to c:\users\niklas\repos\ppy\engine\.env2\Scripts
Installing node.py.exe script to c:\users\niklas\repos\ppy\engine\.env2\Scripts
Installing node.py.exe.manifest script to c:\users\niklas\repos\ppy\engine\.env2\Scripts
writing list of installed files to 'c:\users\niklas\appdata\local\temp\pip-okk7gy-record\install-record.txt'
Error: no such option: --record
I really don't want to necro this thread but after I have seen many suggestions this worked for me:
installation dir => python.exe -m pip install -U pip
I am having significant trouble installing psycopg2 in OSX. After installing Postgresql 9.5.4_1 using homebrew I attempted to install psycopg2 in my virtual environment:
pip install psycopg2
I have also added pg_config to my path using PATH=$PATH:/usr/local/Cellar/postgresql/9.5.4_1/bin/pg_config
Upon excecution I receive a number of errors including:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
And
Failed building wheel for psycopg2
And
Command "/Users/*username*/.virtualenvs/report/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/9p/3_wdgjzd03d6bw1p_c9rrt6c0000gp/T/pip-build-cuplxne2/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/9p/3_wdgjzd03d6bw1p_c9rrt6c0000gp/T/pip-8gbk007q-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/*username*/.virtualenvs/report/bin/../include/site/python3.5/psycopg2" failed with error code 1 in /private/var/folders/9p/3_wdgjzd03d6bw1p_c9rrt6c0000gp/T/pip-build-cuplxne2/psycopg2/
Attempting to build from source results in similar errors...
Previous research and attempted solutions:
"Failed building wheel for psycopg2" - MacOSX using virtualenv and pip
How to install Psycopg2 for Python 3.5
How to install psycopg2 with "pip" on Python?
Installing psycopg2 into virtualenv when PostgreSQL is not installed on development system
Can't install psycopg2 with pip in virtualenv on Mac OS X 10.7
Thanks for any assistance you can provide!
My way for macosx sierra
Install psycopg2 globally, and then use it in virtualenv
pip3 install psycopg2
workon my_env #i use virtualenvwrapper
toggleglobalsitepackages #Enable global site-packages
In my case psycopg2 normally installed as global package, but isn't installed in virtualenv
Mine broke with the Sierra 10.12.2 update. Reinstalled/updated the command line tools and psycopg2 installed correctly.
xcode-select --install
This seems to be an issue with Homebrew's update of for OSX sierra. I was able to finally fix this issue by uninstalling and reinstalling python 3.5 and postgresql with homebrew and then trying to install psycopg2 again.
I am using windows 8.1 64-bit with python 3.3. I have tried to execute easy_install pyodbc and pip install pyodbc each got different errors like below:
easy_install pyodbc:
C:\Python33>easy_install pyodbc
Searching for pyodbc
Reading https://pypi.python.org/simple/pyodbc/
Best match: pyodbc 3.0.10
Downloading
Processing pyodbc-3.0.10.tar.gz
Writing c:\users\chaith~1\appdata\local\temp\easy_install-s1q95y\pyodbc-3.0.10\s etup.cfg Running pyodbc-3.0.10\setup.py -q bdist_egg --dist-dir
c:\users\chaith~1\appdata\local\temp\easy_install-s1q95y\pyodbc-3.0.10\egg-dist-tmp-onfjbk
error: c:\users\chaith~1\appdata\local\temp\easy_install-s1q95y\pyodbc-3.0.10\py
odbc.egg-info\SOURCES.txt: The process cannot access the file because it is bein
g used by another process
pip install pyodbc :
C:\Python33>pip install pyodbc
Collecting pyodbc
Using cached pyodbc-3.0.10.tar.gz
Installing collected packages: pyodbc
Running setup.py install for pyodbc ... error
Complete output from command C:\Python33\python.exe -u -c "import setuptools
, tokenize;__file__='c:\\users\\chaith~1\\appdata\\local\\temp\\pip-build-8xaz3g
\\pyodbc\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read(
).replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\chaith~1\
appdata\local\temp\pip-xaf4bf-record\install-record.txt --single-version-externa
lly-managed --compile:
running install
running build
running build_ext
building 'pyodbc' extension
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
----------------------------------------
Command "C:\Python33\python.exe -u -c "import setuptools,
tokenize;__file__='c:\
\users\\chaith~1\\appdata\\local\\temp\\pip-build-8xaz3g\\pyodbc\\setup.py';exec
(compile(getattr(tokenize, 'open',
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record c:\users\chaith~1\appdata\local\temp\pip-x
af4bf-record\install-record.txt --single-version-externally-managed
--compile" f ailed with error code 1 in c:\users\chaith~1\appdata\local\temp\pip-build-8xaz3g \pyodbc\
I have gone mad searching for the solutions. please help me it is very important for me to connect the sql server database with python
The way #thebjorn suggests solves the problem. More detail is found here: pyodbc requires python 3.3. I just used that method an houror so ago to install 64 bit pyobdc 3.0.10 with python 3.5.1 (for use with pydev running under Eclipse Mars.2) on 64-bit Win 7 Enterprise SP 1.
I ran across a seemingly intimidating exception thrown by the install process (I've documented it in that question) but pyobdc works and pip says it's installed.
BTW, Python 3.5.1 can be installed on Win 7, etc. without admin rights once Microsoft patch KB2999226 has been applied (but that does need admin rights).