I cannot use package parse-rest.
Module parse_rest.connection is not found.
I installed it using pip install parse-rest.
Could you tell me what is missing, please!!!
looking at H:\py_env\ where is my virtualenv installed it does not exists.
ImportError at /
No module named parse_rest.connection
Request Method: GET
Request URL: local
Django Version: 1.7.1
Exception Type: ImportError
Exception Value:
No module named parse_rest.connection
Exception Location: H:\py_env\src\propiedades\models.py in <module>, line 6
Python Executable: C:\Python27\python.exe
Python Version: 2.7.8
Python Path:
['H:\\py_env\\src', ...]
********************************************
(py_env) H:\py_env>pip install parse_rest
Downloading/unpacking parse-rest
Downloading parse_rest-0.10.2013.tar.gz
Running setup.py (path:H:\py_env\build\parse-rest\setup.py) egg_info for package parse-rest
Installing collected packages: parse-rest
Running setup.py install for parse-rest
Successfully installed parse-rest
Cleaning up...
(py_env) H:\py_env>pip freeze
Django==1.7.1
parse-rest==0.10.2013
(py_env) H:\py_env>pip show --files parse_rest
(py_env) H:\py_env>pip show --files parse-rest
---
Name: parse-rest
Version: 0.10.2013
Location: h:\py_env\lib\site-packages
Requires:
Files:
..\parse_rest\installation.py
..\parse_rest\query.py
..\parse_rest\settings_local.py
..\parse_rest\tests.py
..\parse_rest\__init__.py
..\parse_rest\installation.pyc
..\parse_rest\query.pyc
..\parse_rest\settings_local.pyc
..\parse_rest\tests.pyc
..\parse_rest\__init__.pyc
.\
dependency_links.txt
PKG-INFO
SOURCES.txt
top_level.txt
(py_env) H:\py_env>
I was running "manage.py runserver" instead of "python manage.py runsever" and it run the default Python located in c:\ file, not in the virtualenv.
Related
I try to intsall the aws-s3-postgres extension on a windows machine. I follow the installing guide from https://github.com/chimpler/postgres-aws-s3
with - make install - on the directory, where the clone aws-s3-postgres is placed i get following error:
process_begin: CreateProcess((null), pg_config --pgxs, ...) failed.
make: *** windows32_openpipe (): unable to launch process (e=2)
. Stop.
Now is installed:
Python 3.10.0
pip 22.1.2 from C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)
boto Version: 2.49.0
boto3 Version: 1.24.7
pg_config also running
clone aws-s3-postgres is donnloaded.
I have archlinux with python 3.7.13 installed from aur when i run uncompyle6 i get the following error:
$ python3.7 uncompyle6
/usr/bin/python3.7: can't find '__main__' module in 'uncompyle6'
Here is a list of packages I had to install for CKAN 2.7.0
python-setuptools-36.2.4-4.mga7.noarch.rpm
pgdg-redhat96-9.6-3.noarch.rpm
xml-commons git subversion mercurial postgresql96-server postgresql96-devel postgresql96 python-devel libxslt libxslt-devel libxml2 libxml2-devel python-virtualenv gcc gcc-c++ make java-1.6.0-openjdk redis tomcat tomcat-webapps tomcat-admin-webapps xalan-j2unzip policycoreutils-python mod_wsgi httpd tcl-devel redis
after installing these tools i was able to download the git successfully using
pip install --ignore-installed -e git+https://github.com/okfn/ckan.git#ckan-2.7.0#egg=ckan
I then added pgsql-9.6 to the path in order for ckan to recognize pg_config
PATH=$PATH:/usr/pgsql-9.6/bin
Now when I attempt to run the requirements.txt installation it fails with this error
ImportError: No module named pytz
----------------------------------------
Cleaning up...
Command /usr/lib/ckan/default/bin/python -c "import setuptools;__file__='/usr/lib/ckan/default/build/pbr/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Aun2rR-record/install-record.txt --single-version-externally-managed --install-headers /usr/lib/ckan/default/include/site/python2.7 failed with error code 1 in /usr/lib/ckan/default/build/pbr
Storing complete log in /usr/lib/ckan/.pip/pip.log
If anybody can explain what the error means and what I need to install/modify I would greatly appreciate it. Seems there is a package called pytz missing but I cannot find information about it.
Thanks
pytz must must installed inside the virtualenv and the pip-requirements-docs.txt must be run prior to running requirements.txt.
First of all, I am sorry for asking a question that was asked million times, however, I couldn't resolve my issue.
TL;DR:
psycopg2 builds in Python3.4 virtualenv, but not in Python3.2; suspected dev packages missing, where can I get dev packages for old python releases?
Long story:
I should be writing code for Python3.2 using django with PostgreSQL database engine.
Ubuntu 15.04 by default ships with Python3.4 so I have build Python3.2 from source:
$ python3.2 --version
Python 3.2.6
virtualenv is created so:
myproject $ virtualenv -p python3.2 venv
New python executable in venv/bin/python3.2
Also creating executable in venv/bin/python
Installing setuptools, pip...done.
Installing requirements:
myproject $ source venv/bin/activate
(venv)myproject $ pip install psycopg2
The output log can be found in pastebin.
What I have read there:
GCC finishes whatever its doing without error messages; last non-error reporting line is
running install_lib
then it fails with
Command /home/julka/LP/myproject/venv/bin/python3.2 -c "import setuptools, tokenize;__file__='/tmp/pip-build-cbu7a3/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-cyu65o-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/julka/LP/myproject/venv/include/site/python3.2 failed with error code 1 in /tmp/pip-build-cbu7a3/psycopg2
where it was compiling some lib.
Building with Python3.4
julka#Pyragas-vo2:~/L1P/myproject$ virtualenv -p python3.4 venv
Running virtualenv with interpreter /usr/bin/python3.4
Using base prefix '/usr'
New python executable in venv/bin/python3.4
Also creating executable in venv/bin/python
Installing setuptools, pip...done.
julka#Pyragas-vo2:~/LP/myproject$ source venv/bin/activate
(venv)julka#Pyragas-vo2:~/LP/myproject$ pip install psycopg2 --vv > psycopg2.log
Successfully installed psycopg2
Cleaning up...
(venv)julka#Pyragas-vo2:~/LP/myproject$
Successful installation. I have put the log in pastebin.
Maybe I'm missing some kind of development files for python3.2, what do i need to check this out?
python version 2.4
# pip install psycopg2
Getting the following error:
Downloading/unpacking psycopg2
Running setup.py egg_info for package psycopg2
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
Complete output from command python setup.py egg_info:
running egg_info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /root/sources/build/psycopg2
Storing complete log in /root/.pip/pip.log
[root#host sources]# which pg_config
/usr/bin/which: no pg_config in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/b in:/root/bin)
I am unable to install pg_config as an executable
You need to install postgresql-devel package.
Or build Postgres from source and then you'll have pg_config not from a package.
For AWS linux (or RedHat for that matter) use:
sudo yum install postgresql-devel
The above answer is correct: you need to install the -devel package. Furthermore, I found via this comment that you then might need to manually specify where to look for pg_config to build psycopg2.
In particular, I wound up running
python2.7 setup.py build_ext --pg-config /usr/pgsql-9.3/bin/pg_config install
Note that this path will depend on your postgres version.