jkitchin / pycse

Python computations in science and engineering
GNU General Public License v2.0
242 stars 67 forks source link

can't install pycse for python3.6 #21

Closed Infinemen closed 7 years ago

Infinemen commented 7 years ago

i used "pip install pycse" and "pip install git+git://github.com/jkitchin/pycse" to install pycse, but all failed. For "pip install pycse" i got

Collecting pycse Using cached pycse-1.51.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-xy0_8o_0/pycse/setup.py", line 3, in from pycse import version File "/tmp/pip-build-xy0_8o_0/pycse/pycse/init.py", line 11, in from PYCSE import * ModuleNotFoundError: No module named 'PYCSE' Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xy0_8o_0/pycse/

For "pip install git+git://github.com/jkitchin/pycse" , I can install pycse, but can't make it work.

jkitchin commented 7 years ago

I finally figured out the problem. I used a bad numbering scheme for a while, e.g. 1.51 instead of 1.5.1. I have pushed a version 2.0 which I believe should solve this problem with "pip install pycse".

What was the problem with "pip install git+git://github.com/jkitchin/pycse" though?

Infinemen commented 7 years ago

@jkitchin Hi, firstly thank you for your reply and excellent job. Both methods can install pycse now. But there are another error when i evaluate python blocks in emacs. It seems like there are something wrong between pycse and quantities. When i evaluated python blocks, i got

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/quantities/quantity.py", line 231, in __array_prepare__ res._dimensionality = p_dictuf KeyError: <ufunc 'positive'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/site-packages/pycse/init.py", line 78, in import quantities as u File "/usr/lib/python3.6/site-packages/quantities/init.py", line 285, in from .units import File "/usr/lib/python3.6/site-packages/quantities/units/init.py", line 9, in from . import acceleration File "/usr/lib/python3.6/site-packages/quantities/units/acceleration.py", line 7, in from .time import s File "/usr/lib/python3.6/site-packages/quantities/units/time.py", line 18, in aliases=['milliseconds'] File "/usr/lib/python3.6/site-packages/quantities/unitquantity.py", line 62, in new ret._conv_ref = definition._reference File "/usr/lib/python3.6/site-packages/quantities/quantity.py", line 139, in _reference rq = rq u._reference*d File "/usr/lib/python3.6/site-packages/quantities/unitquantity.py", line 230, in pow return self.view(Quantity).pow(other) File "/usr/lib/python3.6/site-packages/quantities/quantity.py", line 88, in g return f(self, other, args) File "/usr/lib/python3.6/site-packages/quantities/quantity.py", line 321, in pow return super(Quantity, self).pow(other) File "/usr/lib/python3.6/site-packages/quantities/quantity.py", line 236, in __array_prepare__ """ % uf ValueError: ufunc <ufunc 'positive'> not supported by quantities please file a bug report at https://github.com/python-quantities

jkitchin commented 7 years ago

What script are you running? I am not able to reproduce this.

Infinemen commented 7 years ago

@jkitchin

+BEGIN_SRC python

import pycse.orgmode import numpy as np import matplotlib.pyplot as plt plt.xkcd() N = 150 r = 2 np.random.rand(N) theta = 2 np.pi np.random.rand(N) area = 200 r*2 np.random.rand(N) colors = theta ax = plt.subplot(111, polar=True) c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv) c.set_alpha(0.75) print(plt.savefig('test.png'))

+END_SRC

jkitchin commented 7 years ago

That script works fine for me. Do you know what version of quantities you are running? It looks like the problem is there, not in pycse.

Infinemen commented 7 years ago

@jkitchin I install quantities from quantities website, not by pip install quantities and then everything works well now. Thanks a lot. Your patience pycse code and the documents help me a lot. Thank you again!

jkitchin commented 7 years ago

I was using 0.10.1 I think. I upgraded and now it says 0+unknown, but I think it is 0.11.1. It still worked. I don't know why you would see something different.