Thanks both!

El miércoles, 15 de junio de 2022 a las 9:42:53 UTC+1, Simon King escribió:

> Here's the command you ran:
>
> (venv) jgarcia@Javier-PC:/var/www$ sudo pip install sqlacodegen==3.0.0b3
>
> The "(venv)" at the beginning of your prompt suggests that you are in an 
> activated virtualenv. But when you run "sudo pip", you are installing the 
> package globally. You now have 2 different versions of sqlacodegen 
> installed in different locations.
>
> You should probably have run "pip install" *without* "sudo". If you *need* 
> sudo (because your virtualenv is owned by root), you must ensure that you 
> run the "pip" that is installed in the virtualenv, by using an absolute 
> path.
>
> Hope that helps,
>
> Simon
>
> On Tue, Jun 14, 2022 at 5:32 PM Javier Garcia <[email protected]> wrote:
>
>> This is what I'm getting when I try to upgrade to 3.0.0b3.
>>
>> (venv) jgarcia@Javier-PC:/var/www$ sudo pip install sqlacodegen==3.0
>> ERROR: Could not find a version that satisfies the requirement 
>> sqlacodegen==3.0 (from versions: 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 
>> 1.1.5, 1.1.6, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.3.0, 3.0.0b1, 3.0.0b2, 3.0.0b3, 
>> 3.0.0rc1)
>> ERROR: No matching distribution found for sqlacodegen==3.0
>> (venv) jgarcia@Javier-PC:/var/www$ sudo pip install sqlacodegen==3.0.0b3
>> Collecting sqlacodegen==3.0.0b3
>>   Downloading sqlacodegen-3.0.0b3-py3-none-any.whl (19 kB)
>> Requirement already satisfied: inflect>=4.0.0 in 
>> /usr/local/lib/python3.8/dist-packages (from sqlacodegen==3.0.0b3) (5.6.0)
>> Requirement already satisfied: SQLAlchemy>=1.4.0 in 
>> /usr/local/lib/python3.8/dist-packages (from sqlacodegen==3.0.0b3) (1.4.37)
>> Collecting importlib-metadata; python_version < "3.10"
>>   Downloading importlib_metadata-4.11.4-py3-none-any.whl (18 kB)
>> Requirement already satisfied: greenlet!=0.4.17; python_version >= "3" 
>> and (platform_machine == "aarch64" or (platform_machine == "ppc64le" or 
>> (platform_machine == "x86_64" or (platform_machine == "amd64" or 
>> (platform_machine == "AMD64" or (platform_machine == "win32" or 
>> platform_machine == "WIN32")))))) in /usr/local/lib/python3.8/dist-packages 
>> (from SQLAlchemy>=1.4.0->sqlacodegen==3.0.0b3) (1.1.2)
>> Collecting zipp>=0.5
>>   Downloading zipp-3.8.0-py3-none-any.whl (5.4 kB)
>> Installing collected packages: zipp, importlib-metadata, sqlacodegen
>>   Attempting uninstall: sqlacodegen
>>     Found existing installation: sqlacodegen 2.3.0
>>     Uninstalling sqlacodegen-2.3.0:
>>       Successfully uninstalled sqlacodegen-2.3.0
>> Successfully installed importlib-metadata-4.11.4 sqlacodegen-3.0.0b3 
>> zipp-3.8.0
>> (venv) jgarcia@Javier-PC:/var/www$ sqlscodegen --version
>>
>> Command 'sqlscodegen' not found, did you mean:
>>
>>   command 'sqlacodegen' from deb sqlacodegen (1.1.6-2build1)
>>
>> Try: sudo apt install <deb name>
>>
>> (venv) jgarcia@Javier-PC:/var/www$ sqlacodegen --version
>> 2.3.0
>>
>> On Tue, Jun 14, 2022 at 5:25 PM Javier Garcia <[email protected]> wrote:
>>
>>> Thanks Simon, do you know how could I install that version as when I 
>>> upgrade the sqlacodegen I still get the version 2.3.0?
>>>
>>> Javier
>>>
>>> El martes, 14 de junio de 2022 a las 17:21:31 UTC+1, Simon King escribió:
>>>
>>>> Based on the CHANGES file, it looks like --generator is a new option in 
>>>> v3.0.0:
>>>>
>>>> https://github.com/agronholm/sqlacodegen/blob/master/CHANGES.rst
>>>>
>>>> Simon
>>>>
>>>> On Tue, Jun 14, 2022 at 5:06 PM Javier Garcia <[email protected]> 
>>>> wrote:
>>>>
>>>>> Hi, 
>>>>>
>>>>> I have tried to run something like this: 
>>>>>
>>>>> sqlacodegen --generator tables 
>>>>> mysql+pymysql://user:password@localhost/dbname
>>>>>
>>>>> but I get:
>>>>>
>>>>> usage: sqlacodegen [-h] [--version] [--schema SCHEMA] [--tables 
>>>>> TABLES] [--noviews] [--noindexes] [--noconstraints] [--nojoined] 
>>>>> [--noinflect] [--noclasses] [--nocomments] [--outfile OUTFILE] [url]
>>>>> sqlacodegen: error: unrecognized arguments: --generator 
>>>>> mysql+pymysql://root:*******@localhost/test_user
>>>>>
>>>>> My sqlacodegen version is 2.3.0.
>>>>>
>>>>> Any help?
>>>>>
>>>>> -- 
>>>>> SQLAlchemy - 
>>>>> The Python SQL Toolkit and Object Relational Mapper
>>>>>  
>>>>> http://www.sqlalchemy.org/
>>>>>  
>>>>> To post example code, please provide an MCVE: Minimal, Complete, and 
>>>>> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
>>>>> description.
>>>>> --- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "sqlalchemy" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/sqlalchemy/6bea9449-3c19-491f-ace7-c17a8440a03an%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/sqlalchemy/6bea9449-3c19-491f-ace7-c17a8440a03an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> -- 
>>> SQLAlchemy - 
>>> The Python SQL Toolkit and Object Relational Mapper
>>>  
>>> http://www.sqlalchemy.org/
>>>  
>>> To post example code, please provide an MCVE: Minimal, Complete, and 
>>> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
>>> description.
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sqlalchemy" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/sqlalchemy/203ea204-b6a2-4a04-84b4-d37eb509aaebn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/sqlalchemy/203ea204-b6a2-4a04-84b4-d37eb509aaebn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
>> SQLAlchemy - 
>> The Python SQL Toolkit and Object Relational Mapper
>>  
>> http://www.sqlalchemy.org/
>>  
>> To post example code, please provide an MCVE: Minimal, Complete, and 
>> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
>> description.
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "sqlalchemy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sqlalchemy/CABtaONT50AL6-Xw1gO6wTmpXxPpZ_jYqVX0j5OGjFL5eo_8ZdQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/sqlalchemy/CABtaONT50AL6-Xw1gO6wTmpXxPpZ_jYqVX0j5OGjFL5eo_8ZdQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/10214308-a356-41d1-8520-67fadf412c35n%40googlegroups.com.

Reply via email to