Python Version : 3.4.0
Pip Version : 9.0.1
Windows 10
I'm trying to install models from pip and getting the following error.
pip install models
Collecting models
Using cached models-0.9.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\KANIKA~1\AppData\Local\Temp\pip-build-p46tenn_\models\setup.py", line 25, in <module>
import models
File "C:\Users\KANIKA~1\AppData\Local\Temp\pip-build-p46tenn_\models\models\__init__.py", line 23, in <module>
from base import *
ImportError: No module named 'base'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\KANIKA~1\AppData\Local\Temp\pip-build-p46tenn_\models\
Please help me solve this error.
According to the documentation here -
"Since 21 Feb 2010 this package is named “PyModels”. It was renamed due to name clashes between the library and local module with concrete models. It is natural to name the latter “models.py” (e.g. in Django), so it would obviously conflict with an external library named “models”."
So may be you can try with - pip install pymodels, if this is what you are looking for.
Related
I tried to build HandTracker target in xcode and got this errors.
error: An error occurred during the fetch of repository 'local_execution_config_python':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_air/295474371363cb7bb712bb69027e5852/external/org_tensorflow/third_party/py/python_configure.bzl", line 213, column 39, in _create_local_python_repository
numpy_include = _get_numpy_include(repository_ctx, python_bin) + "/numpy"
File "/private/var/tmp/_bazel_air/295474371363cb7bb712bb69027e5852/external/org_tensorflow/third_party/py/python_configure.bzl", line 187, column 19, in _get_numpy_include
return execute(
File "/private/var/tmp/_bazel_air/295474371363cb7bb712bb69027e5852/external/org_tensorflow/third_party/remote_config/common.bzl", line 217, column 13, in execute
fail(
Error in fail: Problem getting numpy include path.
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
Is numpy installed?
error: Analysis of aspect '#tulsi//:tulsi/tulsi_aspects.bzl%tulsi_outputs_aspect of //mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp' failed; build aborted: Problem getting numpy include path.
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
Is numpy installed?
note: Elapsed time: 12,284s
note: 0 processes.
error: Build did NOT complete successfully (4 packages loaded, 7 targets configured)
<*> Running Bazel completed in 12509.306 ms
/Users/air/Documents/Mediapipe.xcodeproj/.tulsi/Scripts/bazel_build.py:569: error: Bazel build failed with exit code 1. Please check the build log in Report Navigator (⌘9) for more information.
It says here that I do not have numpy, but I installed it by pip install numpy.
pip list output:
Package Version
------------- --------
absl-py 0.11.0
dataclasses 0.6
numpy 1.19.3
opencv-python 4.4.0.46
pip 20.3.3
protobuf 3.14.0
setuptools 47.1.0
six 1.15.0
wheel 0.36.2
At first, the project was normally builded, but then I don't remember what I did and these errors began. Python 3.8.5, macOS 11.1, bazel 3.7.2
One of the goal of Bazel is to make build reproducibles, so it cannot depend on machine-specific libraries.
You need to define the dependency with pip_import.
I had similar problem when I built bazel using sudo! when I removed sudo every thing worked fine.
I am new in python on flask, when i try to install mysql-python by entering the
following command in terminal
pip3 install mysql-python
it shows the following error:
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-4nev4id4/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-install-4nev4id4/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4nev4id4/mysql-python/
and then I use this command
sudo apt install default-libmysqlclient-dev in terminal which has been suggested by many i checked on stackoverflow.
and then I retry to install mysql-python but also it is showing the same error, can anyone please help me.
mysql-python only supports Python 2.x, while you seem to be using Python 3. From the linked PyPI page:
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently
supported. Python-3.0 will be supported in a future release.
To connect to MySQL from Python 3 you can use other alternatives:
mysqlclient
mysql-connector-python
pymysql
cymysql
MySQL-python does not support python3. That is why you get this particular error
ModuleNotFoundError: No module named 'ConfigParser'
In python3 ConfigParser is renamed configparser
One option to connect to MySQL DB is official python connector
Another option is pyodbc
Other options are provided in other answers
When I try installing mysql-python adaptor with pip3 I get this error message:
$ pip3 install mysql-python
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-qkxwtgtw/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-qkxwtgtw/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-
qkxwtgtw/mysql-python/
It says it in the error message:
ModuleNotFoundError: No module named 'ConfigParser'
Python 3 ImportError: No module named 'ConfigParser'
ModuleNotFoundError: No module named 'ConfigParser' tells us, that you need ConfigParser to be installed first.
MySQL-python-1.2.5 seems pretty old. Not sure if it supports Python 3. Maybe try https://pypi.python.org/pypi/mysqlclient ?
If you're on Windows, sometimes it helps to download and install from the .whl
If I create a clean virtualenv, upgrade my pip version to 9.0.1 (most recent), and try:
$ pip install asteval
Collecting asteval
Downloading asteval-0.9.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-nnWnaR/asteval/setup.py", line 3, in <module>
import asteval
File "asteval/__init__.py", line 20, in <module>
from .asteval import Interpreter
File "asteval/asteval.py", line 18, in <module>
import six
ImportError: No module named six
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nnWnaR/asteval/
Maybe I'm missing something, I thought pip should handle the dependencies? I thought it used to.
The bypass is to separately pip install six, then asteval will install. But I want to require asteval as an import requirement in my code, and I don't want to have to trace dependencies it might have and list those as requirements.
asteval is making a common mistake: importing itself into its setup.py. You should file a bug against the project, asking them to stop doing that.
I was trying to install hyperopt, but I got the following error:
Collecting hyperopt
Using cached hyperopt-0.0.2.tar.gz
Complete output from command python setup.py egg_info:
DEBUG:root:distribute_setup.py not found, defaulting to system setuptools
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-gmhldfe7/hyperopt/setup.py", line 119, in <module>
if package_data is None: package_data = find_package_data(packages)
File "/tmp/pip-build-gmhldfe7/hyperopt/setup.py", line 102, in find_package_data
for subdir in find_subdirectories(package):
File "/tmp/pip-build-gmhldfe7/hyperopt/setup.py", line 73, in find_subdirectories
subdirectories = os.walk(package_to_path(package)).next()[1]
AttributeError: 'generator' object has no attribute 'next'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-gmhldfe7/hyperopt/
And I got the same error when intalling hyperas. But I can install ggplot successfully by using pip command. I am using Ubuntu 14.04 and Python 3.5.
Thanks.
This is a bug in hyperopt. generator.next was renamed to generator.__next__ which can be invoked with next(generator) in Python3.
Here is the PEP detailing the change.
Looks like it was fixed in master but never released. You can install from git (which means github as well) by doing the following:
pip install git+https://github.com/hyperopt/hyperopt.git