Fresh install: name 'long' is not defined (dependency issue)
See original GitHub issueFresh installation on a new laptop. Cloned gpkit repo and ran tests (using python 3.9.7), returned a NameError
. Looks like the problem is with the ad
package but creating a ticket here for tracking.
[~/Software/gpkit][15:24:23]((HEAD detached at 04fb19d))$ python -c "import gpkit.tests; gpkit.tests.run()"
Found no installed solvers, beginning a build.
# Building GPkit version 1.0.0pre
# Moving to the directory from which GPkit was imported.
Attempting to find and build solvers:
# Looking for `mosek_cli`
# (A "success" is if mskexpopt complains that
# we haven't specified a file for it to open.)
# Calling 'mskexpopt'
##
### CALL BEGINS
/bin/sh: mskexpopt: command not found
### CALL ENDS
##
# Looks like `mskexpopt` was not found in the default PATH,
# so let's try locating that binary ourselves.
# expected MOSEK directory not found: /Users/philippe.kirschen/mosek
# Did not find
# mosek_cli
# Looking for `mosek_conif`
# Trying to import mosek...
Found mosek_conif in the default PYTHONPATH
# Looking for `cvxopt`
# Trying to import cvxopt...
Found cvxopt in the default PYTHONPATH
Found the following solvers: mosek_conif, cvxopt
# Replacing directory env
/Users/philippe.kirschen/Software/gpkit/gpkit/small_scripts.py:71: SyntaxWarning: "is" with a literal. Did you mean "=="?
if sweep is "sweep" and (isinstance(value, Iterable) or # pylint: disable=literal-comparison
/Users/philippe.kirschen/Software/gpkit/gpkit/nomials/math.py:586: SyntaxWarning: "is" with a literal. Did you mean "=="?
if posy is 0: # pylint: disable=literal-comparison
/Users/philippe.kirschen/Software/gpkit/gpkit/nomials/math.py:590: SyntaxWarning: "is" with a literal. Did you mean "=="?
if negy is 0: # pylint: disable=literal-comparison
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/philippe.kirschen/Software/gpkit/gpkit/__init__.py", line 19, in <module>
from .constraints.model import Model
File "/Users/philippe.kirschen/Software/gpkit/gpkit/constraints/model.py", line 5, in <module>
from .prog_factories import progify, solvify
File "/Users/philippe.kirschen/Software/gpkit/gpkit/constraints/prog_factories.py", line 5, in <module>
from ad import adnumber
File "/Users/philippe.kirschen/opt/anaconda3/envs/hops/lib/python3.9/site-packages/ad/__init__.py", line 25, in <module>
CONSTANT_TYPES = (float, int, long, complex)
NameError: name 'long' is not defined
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
NameError: global name 'long' is not defined - Stack Overflow
In Python 3.x, use int instead of long . From What's New In Python 3.0, Integers: PEP 237: Essentially, long renamed to int...
Read more >Installation issue: setuptools>=58 breaks support for use_2to3
Hello! I am doing fresh installation of GPkit, a package that has ad as a dependency and I encountered some issues during installation....
Read more >NameError: name 'long' is not defined - Raspberry Pi Forums
Hi I am quite new to raspberry pis and programming so if there is any other information I need to add please let...
Read more >NameError: global name 'wc_repos' or 'section_id' is not defined
Anyone getting this error unfortunately will have to fix it manually. Please log onto the console and do:
Read more >Dependency hell - Wikipedia
The dependency issue arises when several packages have dependencies on the same shared packages or libraries, but they depend on different and incompatible ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hmm, if we specify a minimum ad version it’ll at least not install it when that happens; 1.3.2 seems to work on py.3.5.2, so I’ll specify ad >= 1.3.2
Yes although I believe what needs to be fixed is the version of
setuptools
(<58) and I don’t know if that’s too meta to do in setup.py…